diff options
author | Erik Verbruggen <erik.verbruggen@digia.com> | 2012-10-12 08:58:29 +0200 |
---|---|---|
committer | Erik Verbruggen <erik.verbruggen@digia.com> | 2012-10-12 09:07:34 +0200 |
commit | e3142fee0fd6235a9d69118d31343d1a013852c2 (patch) | |
tree | 638f579a3e40cb745dd4ecadd5625958ddc01039 /v4.pro | |
parent | 54fb3b7af10f3fb8fab7d7fc0ba283dfe9b5f94c (diff) |
Fix: make it possible to change the used LLVM installation.
If either the LLVM_INSTALL_DIR environment variable or the qmake
variable are set, use that to find the llvm-config utility. Changing
those is easier than modifying your path. Can be used if you have more
than one LLVM installation installed.
Change-Id: I24265b397e21f468ece61392a112de9a50c67c5a
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'v4.pro')
-rw-r--r-- | v4.pro | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -2,6 +2,12 @@ QT = core qmldevtools-private CONFIG -= app_bundle CONFIG += console +LLVM_CONFIG=llvm-config + +# Pick up the qmake variable or environment variable for LLVM_INSTALL_DIR. If either was set, change the LLVM_CONFIG to use that. +isEmpty(LLVM_INSTALL_DIR):LLVM_INSTALL_DIR=$$(LLVM_INSTALL_DIR) +!isEmpty(LLVM_INSTALL_DIR):LLVM_CONFIG=$$LLVM_INSTALL_DIR/bin/llvm-config + LIBS += -rdynamic SOURCES += main.cpp \ @@ -34,7 +40,7 @@ HEADERS += \ qv4isel_llvm_p.h INCLUDEPATH += \ - $$system(llvm-config --includedir) + $$system($$LLVM_CONFIG --includedir) DEFINES += \ __STDC_CONSTANT_MACROS \ @@ -42,8 +48,8 @@ DEFINES += \ __STDC_LIMIT_MACROS LIBS += \ - $$system(llvm-config --ldflags) \ - $$system(llvm-config --libs core jit bitreader linker ipo target x86 arm) + $$system($$LLVM_CONFIG --ldflags) \ + $$system($$LLVM_CONFIG --libs core jit bitreader linker ipo target x86 arm) QMAKE_EXTRA_TARGETS += gen_llvm_runtime |