-
Notifications
You must be signed in to change notification settings - Fork 677
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
Add support for multi version bitcode libraries #1250
Conversation
200 deleted lines, I like it :D |
Codecov Report
@@ Coverage Diff @@
## master #1250 +/- ##
=======================================
Coverage 69.18% 69.19%
=======================================
Files 154 154
Lines 18389 18400 +11
Branches 4086 4089 +3
=======================================
+ Hits 12723 12731 +8
Misses 3903 3903
- Partials 1763 1766 +3
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great to see this particularly uggly part of the build system gone! I also appreciate bumping the required cmake version at least somewhat. 👍 Besides from a question that I'll post below, I only found some very minor things while taking a look at your changes.
if (${LLVM_VERSION_MAJOR} GREATER 4) | ||
set(O0OPT "${O0OPT} -Xclang -disable-O0-optnone") | ||
list(APPEND COMMON_CC_FLAGS "-Xclang" "-disable-O0-optnone") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you remove -O0
from COMMON_CC_FLAGS
on purpose? If yes, why keep -disable-O0-optnone
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-O0
should be the default optimisation - -disable-O0-optnone
should have no influence if any higher level is selected.
I didn't want to have any optimisation settings as part of the common flags.
@MartinNowack Great work! However, there is one thing that I don't understand: You write that this PR "allows arbitrary runtime library configurations", but somehow I fail to see how I would choose whether to have assertions enabled or which optimization level I want for the runtime libraries? (Not sure if you are ultimately aiming at this, but I think it would be great if it were possible to choose these parameters at runtime in a future version of KLEE) |
@jbuening Great! Thanks a lot for your review. I'm going to add suggested changes.
And it will automatically generate a set of KLEE runtime libraries with this optimisation and that suffix. |
@MartinNowack that was my concern too. I fail to see how this is used. Maybe just add the above GitHub comment as a code comment somewhere |
d9ba391
to
a7b5dfe
Compare
a7b5dfe
to
3f5af3b
Compare
8030783
to
fdd120b
Compare
@MartinNowack This looks nice! There's some useful cleanup and it's great that the runtime libraries are built more similarly to the rest of the code. However, I feel you need to add some documentation; I'm a bit confused about how to use this. I also don't know how this would solve the include in #1337, can you explain? Two other minor points:
Thanks! |
@ccadar Thanks for your review. I added some more detailed documentation. This should solve most of your questions.
|
Thanks, @MartinNowack, that's really excellent documentation! |
Ubuntu 16.04 supports cmake 3.5.0 as default. Cmake 2.8.12 was the default in 14.04. Use cmake 3 to simplify cmake files.
Every runtime library can be build with multiple configurations. Replace the Makefile-based setup by cmake one. Currently, we generate 32bit and 64bit libraries simultaneously and can link against them.
…to test. Currently, only 32bit vs. 64bit is supported.
fdd120b
to
ff5b12e
Compare
@MartinNowack I see you changed the option name to |
@ccadar Yes, I made your recommended changes. The build is finally through. This is ready to go. |
Cool, thanks again for the excellent changes! |
@MartinNowack |
It builds all. |
It attempts to build all and fails on my system for I don't want nor need a 32-bit libc on it. This should definitely be configurable. |
Currently, KLEE only supports one version of the runtime library.
This is a problem if different setups are needed, e.g. 32bit vs. 64bit or different optimisations.
Moreover, an additional external build system is used to handle the generation of one single bitcode library instance.
This PR simplifies and provides a cmake-only based solution that allows arbitrary runtime library configurations, compilation and their setup.
Moreover, it contains several clean-ups and modernisations of the cmake build system.
Last point, worth to mention, this PR sets the requirement for cmake to 3.5 which is still ancient and even supported by Ubuntu 16.04 as default.