Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

Conversation

@jmarrec
Copy link

@jmarrec jmarrec commented Jan 26, 2023

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

@CLAassistant
Copy link

CLAassistant commented Jan 26, 2023

CLA assistant check
All committers have signed the CLA.

@jmarrec
Copy link
Author

jmarrec commented Jan 26, 2023

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

@woodruffw woodruffw self-requested a review January 27, 2023 17:09
@woodruffw
Copy link
Contributor

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

LLVMBitReader # Core, Support
LLVMCore # Support
LLVMSupport)
LLVM)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for trimming this -- IIRC we had to specify all of these manually for a much earlier version of LLVM.

Copy link
Contributor

@woodruffw woodruffw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great, thanks a ton again! Once you sign the CLA I should be able to merge this in and get a release made.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants