JJohn Ericson[cmake] Fix missing paren in FindPrefixFromConfig
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[libunwind] Try to add --unwindlib=none while configuring and building libunwind If Clang is set up to link directly against libunwind (via the --unwindlib option, or the corresponding builtin default option), configuring libunwind will fail while bootstrapping (before the initial libunwind is built), because every cmake test will fail due to -lunwind not being found, and linking the shared library will fail similarly. Check if --unwindlib=none is supported, and add it in that case. Using check_c_compiler_flag on its own doesn't work, because that only adds the tested flag to the compilation command, and if -lunwind is missing, the linking step would still fail - instead try adding it to CMAKE_REQUIRED_FLAGS and restore the variable if it doesn't work. This avoids having to pass --unwindlib=none while building libunwind. Differential Revision: https://reviews.llvm.org/D112126 | 4 年前 | |
[cmake] Tweak warning in extend_path helper function There was one more reference the word "install" I forgot to remove. Follow-up to bde561c4813952847112600e5efe72d9015556f7 / https://reviews.llvm.org/D115746 | 4 年前 | |
[CMake] Make FindLibEdit.cmake more robust FindLibEdit uses pkg-config to find the necessary flags, but this may break with cross-compilation, because the PkgConfig module in CMake doesn't respect the SYSROOT specified in a toolchain file. Instead of taking the parameters from pkg-config for granted, we check whether our compiler can actually include and link against the library. Fixes #55445 Fixes #55671 Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D126450 | 4 年前 | |
[cmake] Fix missing paren in FindPrefixFromConfig This was in CMake syntax generation, so we didn't catch it eval time. Follow up from D117973 | 3 年前 | |
[cmake] Support custom package install paths Firstly, we we make an additional GNUInstallDirs-style variable. With NixOS, for example, this is crucial as we want those to go in ${dev}/lib/cmake not ${out}/lib/cmake as that would a cmake subdir of the "regular" libdir, which is installed even when no one needs to do any development. Secondly, we make *Config.cmake robust to absolute package install paths. We for NixOS will in fact be passing them absolute paths to make the ${dev} vs ${out} distinction mentioned above, and the GNUInstallDirs-style variables are suposed to support absolute paths in general so it's good practice besides the NixOS use-case. Thirdly, we make ${project}_INSTALL_PACKAGE_DIR CACHE PATHs like other install dirs are. Reviewed By: sebastian-ne Differential Revision: https://reviews.llvm.org/D117973 | 3 年前 | |
[cmake] Demote fatal error to a warning when we don't know the Apple SDK in use Sometimes, we could be building for a platform where we don't link compiler-rt, so being able to figure out the right compiler-rt suffix isn't necessary, but we shouldn't fail the build. | 4 年前 | |
[cmake] Move HandleOutOfTreeLLVM to common cmake utils This is better than libunwind and libcxxabi fishing it out of libcxx's module directory. It is done in prepartion for a better version of D117537 which deduplicates CMake logic instead of just renaming to avoid a name clash. Reviewed By: phosek, #libunwind, #libc_abi, Ericson2314 Differential Revision: https://reviews.llvm.org/D117617 | 4 年前 | |
[cmake] Partially deduplicate {llvm,compiler_rt}_check_linker_flag for runtime libs and llvm We previously had a few varied definitions of this floating around. I had tried to make the one installed with LLVM handle all the cases, and then made the others use it, but this ran into issues with HandleOutOfTreeLLVM not working for compiler-rt, and also CMAKE_EXE_LINKER_FLAGS not working right without CMP0056 set to the new behavior. My compromise solution is this: - No not completely deduplicate: the runtime libs will instead use a version that still exists as part of the internal and not installed common shared CMake utilities. This avoids HandleOutOfTreeLLVM or a workaround for compiler-rt. - Continue to use CMAKE_REQUIRED_FLAGS, which effects compilation and linking. Maybe this is unnecessary, but it's safer to leave that as a future change. Also means we can avoid CMP0056 for now, to try out later, which is good incrementality too. - Call it llvm_check_compiler_linker_flag since it, in fact is about both per its implementation (before and after this patch), so there is no name collision. In the future, we might still enable CMP0056 and make compiler-rt work with HandleOutOfTreeLLVM, which case we delete llvm_check_compiler_flag and go back to the old way (as these are, in fact, linking related flags), but that I leave for someone else as future work. The original issue was reported to me in https://reviews.llvm.org/D116521#3248117 as D116521 made clang and LLVM use the common cmake utils. Reviewed By: sebastian-ne, phosek, #libunwind, #libc, #libc_abi, ldionne Differential Revision: https://reviews.llvm.org/D117537 | 4 年前 | |
[CMake] Move the AIX archiver settings to a module This allows their reuse across projects. The name of the module is intentionally generic because we would like to move more platform checks there. Differential Revision: https://reviews.llvm.org/D115276 | 4 年前 | |
[runtimes] Generalize how we reorder projects This way, we could use it for LLVM_ENABLE_PROJECTS too if desired. Differential Revision: https://reviews.llvm.org/D125121 | 4 年前 |