Skip to content

Commit b796305

Browse files
committed
Merge pull request #1371 from hpux735/thumb
Added thumb to supported platforms conditions
2 parents d03539c + 390e50c commit b796305

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

Diff for: lib/Basic/LangOptions.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ std::pair<bool, bool> LangOptions::setTarget(llvm::Triple triple) {
120120
// Set the "arch" platform condition.
121121
switch (Target.getArch()) {
122122
case llvm::Triple::ArchType::arm:
123+
case llvm::Triple::ArchType::thumb:
123124
addPlatformConditionValue("arch", "arm");
124125
break;
125126
case llvm::Triple::ArchType::aarch64:

Diff for: test/Driver/linker.swift

+19
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
// RUN: %swiftc_driver -driver-print-jobs -target armv7-unknown-linux-gnueabihf -Ffoo -framework bar -Lbaz -lboo -Xlinker -undefined %s 2>&1 > %t.linux.txt
2121
// RUN: FileCheck -check-prefix LINUX-armv7 %s < %t.linux.txt
2222

23+
// RUN: %swiftc_driver -driver-print-jobs -target thumbv7-unknown-linux-gnueabihf -Ffoo -framework bar -Lbaz -lboo -Xlinker -undefined %s 2>&1 > %t.linux.txt
24+
// RUN: FileCheck -check-prefix LINUX-thumbv7 %s < %t.linux.txt
25+
2326
// RUN: %swiftc_driver -driver-print-jobs -emit-library -target x86_64-apple-macosx10.9.1 %s -sdk %S/../Inputs/clang-importer-sdk -lfoo -framework bar -Lbaz -Fgarply -Xlinker -undefined -Xlinker dynamic_lookup -o sdk.out 2>&1 > %t.complex.txt
2427
// RUN: FileCheck %s < %t.complex.txt
2528
// RUN: FileCheck -check-prefix COMPLEX %s < %t.complex.txt
@@ -147,6 +150,22 @@
147150
// LINUX-armv7-DAG: -Xlinker -undefined
148151
// LINUX-armv7: -o linker
149152

153+
// LINUX-thumbv7: swift
154+
// LINUX-thumbv7: -o [[OBJECTFILE:.*]]
155+
156+
// LINUX-thumbv7: clang++{{"? }}
157+
// LINUX-thumbv7-DAG: [[OBJECTFILE]]
158+
// LINUX-thumbv7-DAG: -lswiftCore
159+
// LINUX-thumbv7-DAG: -L [[STDLIB_PATH:[^ ]+/lib/swift]]
160+
// LINUX-thumbv7-DAG: --target=thumbv7-unknown-linux-gnueabihf
161+
// LINUX-thumbv7-DAG: -Xlinker -rpath -Xlinker [[STDLIB_PATH]]
162+
// LINUX-thumbv7-DAG: -F foo
163+
// LINUX-thumbv7-DAG: -framework bar
164+
// LINUX-thumbv7-DAG: -L baz
165+
// LINUX-thumbv7-DAG: -lboo
166+
// LINUX-thumbv7-DAG: -Xlinker -undefined
167+
// LINUX-thumbv7: -o linker
168+
150169
// COMPLEX: bin/ld{{"? }}
151170
// COMPLEX-DAG: -dylib
152171
// COMPLEX-DAG: -syslibroot {{.*}}/Inputs/clang-importer-sdk

0 commit comments

Comments
 (0)