summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-config
diff options
context:
space:
mode:
authorDaniel Sanders <daniel_l_sanders@apple.com>2019-07-19 20:38:05 +0000
committerDaniel Sanders <daniel_l_sanders@apple.com>2019-07-19 20:38:05 +0000
commite664319e7a12b328609dcc0c750c6147e7f357b2 (patch)
tree8725561a92987c7b1c73de17e125fbd1a74de415 /llvm/tools/llvm-config
parente3401a9b8613706c1393afdf7d35a81f8c580c9a (diff)
downloadbcm5719-llvm-e664319e7a12b328609dcc0c750c6147e7f357b2.tar.gz
bcm5719-llvm-e664319e7a12b328609dcc0c750c6147e7f357b2.zip
Expand pseudo-components before embedding in llvm-config
Summary: If you use pseudo-targets like AllTargetsCodeGens in LLVM_DYLIB_COMPONENTS then a test will fail because `./bin/llvm-config --shared-mode` can't handle these targets. We can fix this by expanding them before embedding the string into llvm-config Reviewers: bogner Reviewed By: bogner Subscribers: mgorny, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65011 llvm-svn: 366610
Diffstat (limited to 'llvm/tools/llvm-config')
-rw-r--r--llvm/tools/llvm-config/BuildVariables.inc.in2
-rw-r--r--llvm/tools/llvm-config/CMakeLists.txt1
2 files changed, 2 insertions, 1 deletions
diff --git a/llvm/tools/llvm-config/BuildVariables.inc.in b/llvm/tools/llvm-config/BuildVariables.inc.in
index 3a24d3e974e..63cef75368b 100644
--- a/llvm/tools/llvm-config/BuildVariables.inc.in
+++ b/llvm/tools/llvm-config/BuildVariables.inc.in
@@ -30,7 +30,7 @@
#define LLVM_ENABLE_DYLIB @LLVM_BUILD_LLVM_DYLIB@
#define LLVM_LINK_DYLIB @LLVM_LINK_LLVM_DYLIB@
#define LLVM_ENABLE_SHARED @BUILD_SHARED_LIBS@
-#define LLVM_DYLIB_COMPONENTS "@LLVM_DYLIB_COMPONENTS@"
+#define LLVM_DYLIB_COMPONENTS "@LLVM_DYLIB_COMPONENTS_expanded@"
#define LLVM_DYLIB_VERSION "@LLVM_DYLIB_VERSION@"
#define LLVM_HAS_GLOBAL_ISEL @LLVM_HAS_GLOBAL_ISEL@
#define LLVM_TOOLS_INSTALL_DIR "@LLVM_TOOLS_INSTALL_DIR@"
diff --git a/llvm/tools/llvm-config/CMakeLists.txt b/llvm/tools/llvm-config/CMakeLists.txt
index 8e97a10a00f..15a0cf229c1 100644
--- a/llvm/tools/llvm-config/CMakeLists.txt
+++ b/llvm/tools/llvm-config/CMakeLists.txt
@@ -60,6 +60,7 @@ llvm_canonicalize_cmake_booleans(
LLVM_HAS_RTTI
LLVM_HAS_GLOBAL_ISEL
BUILD_SHARED_LIBS)
+llvm_expand_pseudo_components(LLVM_DYLIB_COMPONENTS_expanded "${LLVM_DYLIB_COMPONENTS}")
configure_file(${BUILDVARIABLES_SRCPATH} ${BUILDVARIABLES_OBJPATH} @ONLY)
# Set build-time environment(s).
OpenPOWER on IntegriCloud