David Greene via llvm-dev
2019-Mar-08 15:48 UTC
[llvm-dev] [CMake] Re-configuring Debug and Release builds
If I've configured a Release build, build it and then go back and re-run cmake with -DCMAKE_BUILD_TYPE=Debug (and nothing else changed), almost nothing gets rebuilt when I try to build. Is this expected? I know I can edit CMakeCache.txt directly and trigger an essentially full rebuild. -David
via llvm-dev
2019-Mar-08 19:52 UTC
[llvm-dev] [CMake] Re-configuring Debug and Release builds
> -----Original Message----- > From: llvm-dev [mailto:llvm-dev-bounces at lists.llvm.org] On Behalf Of David > Greene via llvm-dev > Sent: Friday, March 08, 2019 10:49 AM > To: llvm-dev at lists.llvm.org > Subject: [llvm-dev] [CMake] Re-configuring Debug and Release builds > > If I've configured a Release build, build it and then go back and re-run > cmake with -DCMAKE_BUILD_TYPE=Debug (and nothing else changed), almost > nothing gets rebuilt when I try to build. Is this expected? I know I > can edit CMakeCache.txt directly and trigger an essentially full > rebuild.IME rerunning CMake with new options really does nothing; CMakeCache.txt appears to override the command line, which is not intuitive but seems to be how it actually works. I would hope that this is not a choice made by the LLVM project but a bug/feature of CMake itself. But I haven't ever had the energy to pursue it. --paulr> > -David > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
David Greene via llvm-dev
2019-Mar-08 21:17 UTC
[llvm-dev] [CMake] Re-configuring Debug and Release builds
<paul.robinson at sony.com> writes:>> If I've configured a Release build, build it and then go back and re-run >> cmake with -DCMAKE_BUILD_TYPE=Debug (and nothing else changed), almost >> nothing gets rebuilt when I try to build. Is this expected? I know I >> can edit CMakeCache.txt directly and trigger an essentially full >> rebuild. > > IME rerunning CMake with new options really does nothing; CMakeCache.txt > appears to override the command line, which is not intuitive but seems > to be how it actually works.I thought so too at first, except changing LLVM_TARGETS_TO_BUILD when re-running CMake does indeed cause any new targets to be built. So it can't be the case that the cache overrides everything.> I would hope that this is not a choice made by the LLVM project but a > bug/feature of CMake itself. But I haven't ever had the energy to > pursue it.https://llvm.org/docs/CMake.html#cmake-caches seems to imply that -D options should override cache values, but it doesn't for CMAKE_BUILD_TYPE. -David
Possibly Parallel Threads
- Safety of changing values of variables by editing CMakeCache.txt Vs supplying them through the command line
- undefined reference to typeinfo for CmpInst
- opt with Polly doesn't find the passes
- opt with Polly doesn't find the passes
- CMake build of LLVM/clang with -DCMAKE_BUILD_TYPE=Release does not create release versions?