-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
llvm: add NDEBUG when assertion mode is off #45437
Conversation
`llvm-config --cxxflags` unfortunately does not set `-DNDEBUG`, which Julia needs to set correctly when including LLVM header files.
Hm, static analysis doesn't like this. It follows a path where |
SGTM. I believe LLVM removed this from the default flags sometime between versions 6 and 8 (Julia v1.3 and v1.4) without us noticing. Until then, we had
|
You might need to add |
bump? |
llvm-config --cxxflags
unfortunately does not return-DNDEBUG
when LLVM isbuilt with it, but Julia is required to have this define when including LLVM
header files. I didn't check if llvm-config --cxxflags has changed at some
point in LLVM (I think so because Julia switched from explicit
-DNDEBUG
tollvm-config --cxxflags
in v0.2.0 ages ago [1]), but thellvm-config --assertion-mode
flag was introduced a little after Julia dropped explicit
-DNDEBUG
[2].Found this when compiling Julia with PGO enabled, which simply fails to link
because of virtual functions LLVM guards behind ifdefs.
[1] d2f6a78
[2] llvm-mirror/llvm@0427957