[PATCH] D11835: Make `llvm-config` work when static versions of LLVM's components aren't installed.

Richard Diamond via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 29 15:32:29 PDT 2015


DiamondLovesYou added inline comments.

================
Comment at: tools/llvm-config/llvm-config.cpp:380
@@ +379,3 @@
+      // static libraries) for obvious reasons, but I thought it should be
+      // documented nonetheless.
+      const bool BuiltWithSharedLib = (std::strcmp(LLVM_ENABLE_SHARED, "ON") == 0);
----------------
beanz wrote:
> LLVM_DYLIB_COMPONENTS doesn't need to be a cached value, and I don't think it should be. The only benefit to making it a cached value would be that it would show up in ccmake and the CMake GUI, but it brings downsides because there is no cache invalidation in CMake. If you override it on the command line the overridden value will end up in the cache, so there is no requirement for this to be cached. With it not being in the cache, if the default value changes it will update everyone's build directories, which should work without issue.
Or one could use a shadow variable to check for changes and keep `LLVM_DYLIB_COMPONENTS` as a cached variable so it can show up in the CMake GUI.

At any rate, this discussion is tangential to Brad's original comment, which is fixed.


Repository:
  rL LLVM

http://reviews.llvm.org/D11835





More information about the llvm-commits mailing list