[llvm-dev] CMake build of LLVM/clang with -DCMAKE_BUILD_TYPE=Release does not create release versions? (original) (raw)

Chris Bieneman via llvm-dev llvm-dev at lists.llvm.org
Wed Sep 19 11:45:51 PDT 2018


The relevant documentation regarding the behavior of the VS generator is here:

https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html <https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html>

The relevant quote is:

"This variable is only meaningful to single-configuration generators (such as Makefile Generators and Ninja) i.e. those which choose a single configuration when CMake runs to generate a build tree as opposed to multi-configuration generators which offer selection of the build configuration within the generated build environment."

-Chris

On Sep 19, 2018, at 7:06 AM, Dennis Luehring via llvm-dev <llvm-dev at lists.llvm.org> wrote:

thx for the help - debug and release version is built Am 19.09.2018 um 13:21 schrieb Dennis Luehring via llvm-dev: beware of small trap:

cmake --build . --config Release works cmake --config Release --build . breaks after does not build - leaves build without errors Am 19.09.2018 um 11:03 schrieb Dennis Luehring via llvm-dev: > >because with that generator the CMAKEBUILDTYPE variable is ignored > >because it is a "multi-configuration target". > > thanks for the link, is that a bug in the CMake configuration (or better > not getting any warning) or is there just documentation missing? > > so i can use --config Debug or --config Release and get the correct > results - i hope that works the build takes hours > > strange is that -DCMAKEBUILDTYPE=Debug results in a different > build-directory size compared to -DCMAKEBUILDTYPE=Release - so its not > fully ignored? > > Am 19.09.2018 um 10:30 schrieb Boldizsar.Palotas at esa.int: > > If I understand correctly, you need to set Release mode within the VS IDE > > because with that generator the CMAKEBUILDTYPE variable is ignored > > because it is a "multi-configuration target". > > > > see > > https://stackoverflow.com/questions/24460486/cmake-build-type-not-being-used-in-cmakelists-txt > > > > > > > > From: Dennis Luehring via llvm-dev <llvm-dev at lists.llvm.org> > > To: llvm-dev <llvm-dev at lists.llvm.org> > > Date: 2018.09.19 06:11 > > Subject: [llvm-dev] CMake build of LLVM/clang with > > -DCMAKEBUILDTYPE=Release does not create release versions? > > Sent by: "llvm-dev" <llvm-dev-bounces at lists.llvm.org> > > > > > > > > my build environment: > > > > Win7 x64 > > VStudio 2017 Community Edition 15.8.4 (latest) > > CMake 3.12.1 (x86) > > git 2.19.0 (latest, x64) > > Python 2.7.2 (x86) > > > > directory structure > > > > test > > llvm <-- git clone https://github.com/llvm-mirror/llvm_ _> > tools > > clang <-- git clone https://github.com/llvm-mirror/clang_ _> > llvmbuild > > > > Debug build: clean build, llvmbuild is deleted before > > > > llvmbuild> cmake -Thost=x64 -G "Visual Studio 15 2017 Win64" > > -DCMAKEBUILDTYPE=Debug -DLLVMTARGETSTOBUILD=host > > -DLLVMBUILDEXAMPLES=1 -DCLANGBUILDEXAMPLES=1 > > -DLLVMINCLUDETESTS=OFF -DLLVMINCLUDEDOCS=OFF ..\llvm > > > > builds for hours, a few warning, no errors -> llvmbuild is ~44GB > > > > i can find many working libs/exes(also examples) in > > llvmbuild\Debug(lib|bin) > > > > then i tried to build release versions > > > > Release build: clean build, llvmbuild is deleted before > > > > llvmbuild> cmake -Thost=x64 -G "Visual Studio 15 2017 Win64" > > -DCMAKEBUILDTYPE=Release -DLLVMTARGETSTOBUILD=host > > -DLLVMBUILDEXAMPLES=1 -DCLANGBUILDEXAMPLES=1 > > -DLLVMINCLUDETESTS=OFF -DLLVMINCLUDEDOCS=OFF ..\llvm > > > > builds for hours, a few warning, no errors -> llvmbuild is ~47GB (i > > though Release would be smaller?) > > > > i can find many working libs/exes(also examples) in > > llvmbuild\Debug(lib|bin) - the executables seems to be larger as in > > "Debug"-Build? > > > > llvm-build\Release\bin just contains llvm-lit.py > > > > why is the debug folder populated and where i can find the Release build > > libs/exes? > > > > _> > ________________________ > > LLVM Developers mailing list > > llvm-dev at lists.llvm.org > > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev > > > > > > > > This message is intended only for the recipient(s) named above. It may contain proprietary information and/or > > protected content. Any unauthorised disclosure, use, retention or dissemination is prohibited. If you have received > > this e-mail in error, please notify the sender immediately. ESA applies appropriate organisational measures to protect > > personal data, in case of data privacy queries, please contact the ESA Data Protection Officer (dpo at esa.int). > > > > > _> ________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev


LLVM Developers mailing list llvm-dev at lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev


LLVM Developers mailing list llvm-dev at lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev

-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180919/05e3ca9e/attachment.html>



More information about the llvm-dev mailing list