aboutsummaryrefslogtreecommitdiffstats
path: root/share/qbs/modules/cpp/windows-clang-cl.qbs
diff options
context:
space:
mode:
Diffstat (limited to 'share/qbs/modules/cpp/windows-clang-cl.qbs')
-rw-r--r--share/qbs/modules/cpp/windows-clang-cl.qbs19
1 files changed, 16 insertions, 3 deletions
diff --git a/share/qbs/modules/cpp/windows-clang-cl.qbs b/share/qbs/modules/cpp/windows-clang-cl.qbs
index 1b2833060..a34a67ad2 100644
--- a/share/qbs/modules/cpp/windows-clang-cl.qbs
+++ b/share/qbs/modules/cpp/windows-clang-cl.qbs
@@ -40,7 +40,7 @@ MsvcBaseModule {
qbs.toolchain && qbs.toolchain.contains('clang-cl')
priority: 100
- Probes.BinaryProbe {
+ Probes.ClangClBinaryProbe {
id: clangPathProbe
condition: !toolchainInstallPath && !_skipAllChecks
names: ["clang-cl"]
@@ -52,9 +52,11 @@ MsvcBaseModule {
compilerFilePath: compilerPath
vcvarsallFilePath: vcvarsallPath
enableDefinesByLanguage: enableCompilerDefinesByLanguage
- architecture: qbs.architecture
+ preferredArchitecture: qbs.architecture
}
+ qbs.architecture: clangClProbe.found ? clangClProbe.architecture : original
+
compilerVersionMajor: clangClProbe.versionMajor
compilerVersionMinor: clangClProbe.versionMinor
compilerVersionPatch: clangClProbe.versionPatch
@@ -65,7 +67,18 @@ MsvcBaseModule {
: undefined
buildEnv: clangClProbe.buildEnv
- property string vcvarsallPath
+ property string linkerVariant
+ PropertyOptions {
+ name: "linkerVariant"
+ allowedValues: ["lld", "link"]
+ description: "Allows to specify the linker variant. Maps to clang-cl's -fuse-ld option."
+ }
+ Properties {
+ condition: linkerVariant
+ driverLinkerFlags: "-fuse-ld=" + linkerVariant
+ }
+
+ property string vcvarsallPath : clangPathProbe.found ? clangPathProbe.vcvarsallPath : undefined
compilerName: "clang-cl.exe"
linkerName: "lld-link.exe"