Skip to content

Commit a3c92e1

Browse files
committed
Remove build options for conditionally enabling targets
* We don't have a use-case for this. * Swift, like Clang, is fundamentally a cross-compiler, and there is no known reason to artificially limit it.
1 parent 742c8c8 commit a3c92e1

File tree

6 files changed

+0
-23
lines changed

6 files changed

+0
-23
lines changed

CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,6 @@ option(SWIFT_INCLUDE_DOCS
5454
"Create targets for building docs."
5555
TRUE)
5656

57-
option(SWIFT_ENABLE_TARGET_LINUX
58-
"Enable compiler support for targeting Linux"
59-
TRUE)
60-
6157
set(SWIFT_VERSION "2.2" CACHE STRING
6258
"The user-visible version of the Swift compiler")
6359
set(SWIFT_VENDOR "" CACHE STRING

lib/Driver/CMakeLists.txt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,3 @@ add_swift_library(swiftDriver
1717
DEPENDS SwiftOptions
1818
LINK_LIBRARIES swiftAST swiftBasic swiftFrontend swiftOption)
1919

20-
if(${SWIFT_ENABLE_TARGET_LINUX})
21-
foreach(f ${swiftDriver_sources})
22-
set_property(SOURCE ${f} APPEND_STRING PROPERTY COMPILE_FLAGS
23-
" -DSWIFT_ENABLE_TARGET_LINUX=\"1\"")
24-
endforeach()
25-
endif()

lib/Driver/Driver.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2035,11 +2035,9 @@ const ToolChain *Driver::getToolChain(const ArgList &Args) const {
20352035
case llvm::Triple::WatchOS:
20362036
TC = new toolchains::Darwin(*this, Target);
20372037
break;
2038-
#if defined(SWIFT_ENABLE_TARGET_LINUX)
20392038
case llvm::Triple::Linux:
20402039
TC = new toolchains::Linux(*this, Target);
20412040
break;
2042-
#endif // SWIFT_ENABLE_TARGET_LINUX
20432041
default:
20442042
TC = nullptr;
20452043
}

lib/Driver/ToolChains.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -998,8 +998,6 @@ toolchains::Darwin::constructInvocation(const LinkJobAction &job,
998998
return {"ld", Arguments};
999999
}
10001000

1001-
#if defined(SWIFT_ENABLE_TARGET_LINUX)
1002-
10031001
ToolChain::InvocationInfo
10041002
toolchains::Linux::constructInvocation(const InterpretJobAction &job,
10051003
const JobContext &context) const {
@@ -1127,5 +1125,3 @@ toolchains::Linux::constructInvocation(const LinkJobAction &job,
11271125
return {"clang++", Arguments};
11281126
}
11291127

1130-
#endif // SWIFT_ENABLE_TARGET_LINUX
1131-

lib/Driver/ToolChains.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ class LLVM_LIBRARY_VISIBILITY Darwin : public ToolChain {
3636

3737
};
3838

39-
#if defined(SWIFT_ENABLE_TARGET_LINUX)
40-
4139
class LLVM_LIBRARY_VISIBILITY Linux : public ToolChain {
4240
protected:
4341
InvocationInfo constructInvocation(const InterpretJobAction &job,
@@ -52,8 +50,6 @@ class LLVM_LIBRARY_VISIBILITY Linux : public ToolChain {
5250
~Linux() = default;
5351
};
5452

55-
#endif // SWIFT_ENABLE_TARGET_LINUX
56-
5753
} // end namespace toolchains
5854
} // end namespace driver
5955
} // end namespace swift

utils/build-script-impl

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,6 @@ KNOWN_SETTINGS=(
170170
extra-swift-args "" "Extra arguments to pass to swift modules which match regex. Assumed to be a flattened cmake list consisting of [module_regexp, args, module_regexp, args, ...]"
171171
sil-verify-all "0" "If enabled, run the sil verifier be run after every SIL pass"
172172
swift-enable-ast-verifier "1" "If enabled, and the assertions are enabled, the built Swift compiler will run the AST verifier every time it is invoked"
173-
swift-enable-target-linux "1" "Enable compiler support for targeting Linux"
174-
swift-enable-target-freebsd "1" "Enable compiler support for targeting FreeBSD"
175173
swift-runtime-enable-dtrace "0" "Enable runtime dtrace support"
176174
swift-runtime-enable-leak-checker "0" "Enable leaks checking routines in the runtime"
177175
use-gold-linker "" "Enable using the gold linker"
@@ -1425,7 +1423,6 @@ for deployment_target in "${NATIVE_TOOLS_DEPLOYMENT_TARGETS[@]}" "${CROSS_TOOLS_
14251423
-DSWIFT_VERIFY_ALL:BOOL=$(true_false "${SIL_VERIFY_ALL}")
14261424
-DSWIFT_RUNTIME_ENABLE_DTRACE:BOOL=$(true_false "${SWIFT_RUNTIME_ENABLE_DTRACE}")
14271425
-DSWIFT_RUNTIME_ENABLE_LEAK_CHECKER:BOOL=$(true_false "${SWIFT_RUNTIME_ENABLE_LEAK_CHECKER}")
1428-
-DSWIFT_ENABLE_TARGET_LINUX:BOOL=$(true_false "${SWIFT_ENABLE_TARGET_LINUX}")
14291426
)
14301427

14311428
for product in "${PRODUCTS[@]}"; do

0 commit comments

Comments
 (0)