constexpr-everything icon indicating copy to clipboard operation
constexpr-everything copied to clipboard

Upgrade to LLVM 13, 14, 15 + CI improvements

Open jmarrec opened this issue 2 years ago • 3 comments

I saw #17 only after I was done, so I tried to integrate @clin99 's changes into my branch.

jmarrec avatar Jan 26 '23 23:01 jmarrec

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Jan 26 '23 23:01 CLAassistant

On mac with clang 15 from homebrew (arm64 M1 mac) I get a weird error. See it on GHA here: https://github.com/jmarrec/constexpr-everything/actions/runs/4020220358/jobs/6907896141#step:4:15

./constexpr-everything -p . ../main.cpp
In file included from /Users/julien/Software/Others/constexpr-everything/main.cpp:1:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/iostream:37:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/ios:214:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/__locale:15:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/string:519:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/__debug:14:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/iosfwd:98:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/__mbstate_t.h:29:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/wchar.h:123:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/wchar.h:89:10: fatal error: 'stdarg.h' file not found
#include <stdarg.h>
         ^~~~~~~~~~
1 error generated.
Error while processing /Users/julien/Software/Others/constexpr-everything/build/../main.cpp.

On Ubuntu 20.04 too, clang 15, see it failing on GHA here: https://github.com/jmarrec/constexpr-everything/actions/runs/4020206830/jobs/6907869443#step:5:6

$ ./constexpr-everything -p . -fix ../main.cpp 
: CommandLine Error: Option 'enable-fs-discriminator' registered more than once!
LLVM ERROR: inconsistency in registered CommandLine options
Aborted (core dumped)

This seems to fix it...

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 11911ec..8b9e0c6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -65,11 +65,4 @@ target_link_libraries(${PROJECT_NAME} ${LIBRARY_LIST})
 
 target_link_libraries(
   ${PROJECT_NAME}
-  LLVMTransformUtils
-  LLVMAnalysis
-  LLVMTarget
-  LLVMOption # Support
-  LLVMObject # BitReader, Core, Support
-  LLVMBitReader # Core, Support
-  LLVMCore # Support
-  LLVMSupport)
+  LLVM)

This actually reduces the binary size... 4 to 6 MB less

cf before: https://github.com/jmarrec/constexpr-everything/actions/runs/4020059164 cf after: https://github.com/jmarrec/constexpr-everything/actions/runs/4020220358

jmarrec avatar Jan 26 '23 23:01 jmarrec

Thanks a ton for tackling this! I should have some time to do a full review this afternoon.

woodruffw avatar Jan 27 '23 17:01 woodruffw