You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[build-script] Always set -DNDEBUG when overriding CMAKE_{C,CXX}_FLAGS_RELWITHDEBINFO for swift and llvm.
Turns out -DLLVM_ENABLE_ASSERTIONS does not actually enable assertions in LLVM!
What it actually does is rewrite the -DNDEBUG flag to be -UNDEBUG. This means
that we always want to pass in -DNDEBUG to swift. There are some complications
though. This means that we can not compile the C++ part of the runtime with a
different assertions setting than the swift compiler/llvm. This is a trade off
that for now we are ok with to get the no-asserts build working.
As part of a separate change, we are going to make -DLLVM_ENABLE_ASSERTIONS more
robust by doing what swift does now, putting -DNDEBUG or -UNDEBUG after CMake's
-DNDEBUG so we get the correct behavior of disabling or enabling assertions.
rdar://28485525
0 commit comments