Skip to content

Commit 63fb66c

Browse files
committed
---
yaml --- r: 347467 b: refs/heads/master c: 06a1281 h: refs/heads/master i: 347465: d7831e7 347463: c50c2b9
1 parent b899c42 commit 63fb66c

File tree

11 files changed

+68
-90
lines changed

11 files changed

+68
-90
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: a23a1eaec9eb6c0b8b4da698f7116b03c4576e79
2+
refs/heads/master: 06a1281bb85a800c20317aafaeb2a0b6f2f08076
33
refs/heads/master-next: 203b3026584ecad859eb328b2e12490099409cd5
44
refs/tags/osx-passed: b6b74147ef8a386f532cf9357a1bde006e552c54
55
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-a: 6bb18e013c2284f2b45f5f84f2df2887dc0f7dea

trunk/cmake/modules/AddSwift.cmake

Lines changed: 9 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1376,15 +1376,8 @@ endfunction()
13761376
# add_swift_host_library(name
13771377
# [SHARED]
13781378
# [STATIC]
1379-
# [DEPENDS dep1 ...]
1380-
# [INTERFACE_LINK_LIBRARIES dep1 ...]
1381-
# [SWIFT_MODULE_DEPENDS dep1 ...]
13821379
# [LLVM_COMPONENT_DEPENDS comp1 ...]
13831380
# [FILE_DEPENDS target1 ...]
1384-
# [C_COMPILE_FLAGS flag1...]
1385-
# [LINK_FLAGS flag1...]
1386-
# [INSTALL]
1387-
# INSTALL_IN_COMPONENT comp
13881381
# source1 [source2 source3 ...])
13891382
#
13901383
# name
@@ -1396,24 +1389,12 @@ endfunction()
13961389
# STATIC
13971390
# Build a static library.
13981391
#
1399-
# DEPENDS
1400-
# Targets that this library depends on.
1401-
#
14021392
# LLVM_COMPONENT_DEPENDS
14031393
# LLVM components this library depends on.
14041394
#
14051395
# FILE_DEPENDS
14061396
# Additional files this library depends on.
14071397
#
1408-
# C_COMPILE_FLAGS
1409-
# Extra compiler flags (C, C++, ObjC).
1410-
#
1411-
# LINK_FLAGS
1412-
# Extra linker flags.
1413-
#
1414-
# INSTALL_IN_COMPONENT comp
1415-
# The Swift installation component that this library belongs to.
1416-
#
14171398
# source1 ...
14181399
# Sources to add into this library.
14191400
function(add_swift_host_library name)
@@ -1427,7 +1408,6 @@ function(add_swift_host_library name)
14271408
DEPENDS
14281409
FILE_DEPENDS
14291410
INTERFACE_LINK_LIBRARIES
1430-
LINK_FLAGS
14311411
LINK_LIBRARIES
14321412
LLVM_COMPONENT_DEPENDS)
14331413

@@ -1438,6 +1418,15 @@ function(add_swift_host_library name)
14381418
${ARGN})
14391419
set(ASHL_SOURCES ${ASHL_UNPARSED_ARGUMENTS})
14401420

1421+
if(ASHL_C_COMPILE_FLAGS)
1422+
message(SEND_ERROR "library ${name} is using C_COMPILE_FLAGS parameter which is deprecated. Please use target_compile_definitions, target_compile_options, or target_include_directories instead")
1423+
endif()
1424+
if(ASHL_DEPENDS)
1425+
message(SEND_ERROR "library ${name} is using DEPENDS parameter which is deprecated. Please use add_dependencies instead")
1426+
endif()
1427+
if(ASHL_INTERFACE_LINK_LIBRARIES)
1428+
message(SEND_ERROR "library ${name} is using INTERFACE_LINK_LIBRARIES parameter which is deprecated. Please use target_link_libraries instead.")
1429+
endif()
14411430
if(ASHL_LINK_LIBRARIES)
14421431
message(SEND_ERROR "library ${name} is using LINK_LIBRARIES parameter which is deprecated. Please use target_link_libraries instead")
14431432
endif()
@@ -1457,12 +1446,8 @@ function(add_swift_host_library name)
14571446
${ASHL_FORCE_BUILD_OPTIMIZED_keyword}
14581447
SDK ${SWIFT_HOST_VARIANT_SDK}
14591448
ARCHITECTURE ${SWIFT_HOST_VARIANT_ARCH}
1460-
DEPENDS ${ASHL_DEPENDS}
14611449
LLVM_COMPONENT_DEPENDS ${ASHL_LLVM_COMPONENT_DEPENDS}
14621450
FILE_DEPENDS ${ASHL_FILE_DEPENDS}
1463-
C_COMPILE_FLAGS ${ASHL_C_COMPILE_FLAGS}
1464-
LINK_FLAGS ${ASHL_LINK_FLAGS}
1465-
INTERFACE_LINK_LIBRARIES ${ASHL_INTERFACE_LINK_LIBRARIES}
14661451
INSTALL_IN_COMPONENT "dev"
14671452
)
14681453

trunk/lib/AST/CMakeLists.txt

Lines changed: 21 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,8 @@ if (SWIFT_FORCE_OPTIMIZED_TYPECHECKER)
44
endif()
55

66
if(SWIFT_BUILD_ONLY_SYNTAXPARSERLIB)
7-
set(SWIFTAST_INTERFACE_LINK_LIBRARIES)
87
set(SWIFTAST_LLVM_COMPONENT_DEPENDS)
98
else()
10-
set(SWIFTAST_INTERFACE_LINK_LIBRARIES
11-
# Clang dependencies.
12-
# FIXME: Clang should really export these in some reasonable manner.
13-
clangCodeGen
14-
clangIndex
15-
clangFormat
16-
clangToolingCore
17-
clangFrontendTool
18-
clangFrontend
19-
clangDriver
20-
clangSerialization
21-
clangParse
22-
clangSema
23-
clangAnalysis
24-
clangEdit
25-
clangRewriteFrontend
26-
clangRewrite
27-
clangAST
28-
clangLex
29-
clangAPINotes
30-
clangBasic
31-
)
329
set(SWIFTAST_LLVM_COMPONENT_DEPENDS
3310
bitreader bitwriter coroutines coverage irreader debuginfoDWARF
3411
profiledata instrumentation object objcarcopts mc mcparser
@@ -98,14 +75,32 @@ add_swift_host_library(swiftAST STATIC
9875
UnqualifiedLookup.cpp
9976
USRGeneration.cpp
10077

101-
INTERFACE_LINK_LIBRARIES
102-
${SWIFTAST_INTERFACE_LINK_LIBRARIES}
103-
10478
LLVM_COMPONENT_DEPENDS
10579
${SWIFTAST_LLVM_COMPONENT_DEPENDS}
10680

10781
${EXTRA_AST_FLAGS}
10882
)
83+
if(NOT SWIFT_BUILD_ONLY_SYNTAXPARSERLIB)
84+
target_link_libraries(swiftAST INTERFACE
85+
clangCodeGen
86+
clangIndex
87+
clangFormat
88+
clangToolingCore
89+
clangFrontendTool
90+
clangFrontend
91+
clangDriver
92+
clangSerialization
93+
clangParse
94+
clangSema
95+
clangAnalysis
96+
clangEdit
97+
clangRewriteFrontend
98+
clangRewrite
99+
clangAST
100+
clangLex
101+
clangAPINotes
102+
clangBasic)
103+
endif()
109104

110105
if(SWIFT_BUILD_ONLY_SYNTAXPARSERLIB)
111106
# Add clangBasic as a single direct dependency to avoid bringing along some

trunk/lib/Basic/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,9 @@ add_swift_host_library(swiftBasic STATIC
105105
GYB_SOURCES
106106
UnicodeExtendedGraphemeClusters.cpp.gyb
107107

108-
C_COMPILE_FLAGS ${UUID_INCLUDE}
109108
LLVM_COMPONENT_DEPENDS support)
109+
target_include_directories(swiftBasic PRIVATE
110+
${UUID_INCLUDE})
110111

111112
if(NOT SWIFT_BUILD_ONLY_SYNTAXPARSERLIB)
112113
target_link_libraries(swiftBasic PRIVATE

trunk/lib/Demangling/CMakeLists.txt

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1-
add_swift_host_library(swiftDemangling
2-
STATIC
3-
Demangler.cpp
4-
Context.cpp
5-
ManglingUtils.cpp
6-
NodeDumper.cpp
7-
NodePrinter.cpp
8-
OldDemangler.cpp
9-
OldRemangler.cpp
10-
Punycode.cpp
11-
Remangler.cpp
12-
C_COMPILE_FLAGS
13-
-DLLVM_DISABLE_ABI_BREAKING_CHECKS_ENFORCING=1)
1+
add_swift_host_library(swiftDemangling STATIC
2+
Demangler.cpp
3+
Context.cpp
4+
ManglingUtils.cpp
5+
NodeDumper.cpp
6+
NodePrinter.cpp
7+
OldDemangler.cpp
8+
OldRemangler.cpp
9+
Punycode.cpp
10+
Remangler.cpp)
11+
target_compile_definitions(swiftDemangling PRIVATE
12+
LLVM_DISABLE_ABI_BREAKING_CHECKS_ENFORCING=1)
1413

trunk/lib/Driver/CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ set(swiftDriver_sources
1818
set(swiftDriver_targetDefines)
1919

2020
add_swift_host_library(swiftDriver STATIC
21-
${swiftDriver_sources}
22-
DEPENDS SwiftOptions)
21+
${swiftDriver_sources})
22+
add_dependencies(swiftDriver
23+
SwiftOptions)
2324
target_link_libraries(swiftDriver PRIVATE
2425
swiftAST
2526
swiftBasic

trunk/lib/Frontend/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ add_swift_host_library(swiftFrontend STATIC
1010
ParseableInterfaceModuleLoader.cpp
1111
ParseableInterfaceSupport.cpp
1212
PrintingDiagnosticConsumer.cpp
13-
SerializedDiagnosticConsumer.cpp
14-
DEPENDS
15-
SwiftOptions)
13+
SerializedDiagnosticConsumer.cpp)
14+
add_dependencies(swiftFrontend
15+
SwiftOptions)
1616
target_link_libraries(swiftFrontend PRIVATE
1717
swiftSIL
1818
swiftMigrator

trunk/lib/FrontendTool/CMakeLists.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ add_swift_host_library(swiftFrontendTool STATIC
22
FrontendTool.cpp
33
ImportedModules.cpp
44
ReferenceDependencies.cpp
5-
TBD.cpp
6-
DEPENDS
7-
swift-syntax-generated-headers SwiftOptions
8-
INTERFACE_LINK_LIBRARIES
9-
clangAPINotes
10-
clangBasic
11-
)
5+
TBD.cpp)
6+
add_dependencies(swiftFrontendTool
7+
swift-syntax-generated-headers
8+
SwiftOptions)
9+
target_link_libraries(swiftFrontendTool INTERFACE
10+
clangAPINotes
11+
clangBasic)
1212
target_link_libraries(swiftFrontendTool PRIVATE
1313
swiftClangImporter
1414
swiftDemangling

trunk/lib/IRGen/CMakeLists.txt

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,16 +51,13 @@ add_swift_host_library(swiftIRGen STATIC
5151
TypeLayoutDumper.cpp
5252
TypeLayoutVerifier.cpp
5353

54-
INTERFACE_LINK_LIBRARIES
55-
# Clang dependencies.
56-
# FIXME: Clang should really export these in some reasonable manner.
57-
clangCodeGen
58-
clangAST
59-
6054
LLVM_COMPONENT_DEPENDS
6155
target
6256
transformutils
6357
)
58+
target_link_libraries(swiftIRGen INTERFACE
59+
clangCodeGen
60+
clangAST)
6461
target_link_libraries(swiftIRGen PRIVATE
6562
swiftAST
6663
swiftLLVMPasses

trunk/lib/Option/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
add_swift_host_library(swiftOption STATIC
22
Options.cpp
33
SanitizerOptions.cpp
4-
DEPENDS SwiftOptions
54
FILE_DEPENDS SwiftOptions)
5+
add_dependencies(swiftOption
6+
SwiftOptions)
67
target_link_libraries(swiftOption PRIVATE
78
swiftBasic)
89

trunk/lib/SwiftDemangle/CMakeLists.txt

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
add_swift_host_library(swiftDemangle
2-
SHARED
3-
SwiftDemangle.cpp
4-
MangleHack.cpp
5-
C_COMPILE_FLAGS
6-
-DLLVM_DISABLE_ABI_BREAKING_CHECKS_ENFORCING=1)
1+
add_swift_host_library(swiftDemangle SHARED
2+
SwiftDemangle.cpp
3+
MangleHack.cpp)
4+
target_compile_definitions(swiftDemangle PRIVATE
5+
LLVM_DISABLE_ABI_BREAKING_CHECKS_ENFORCING=1)
76
target_link_libraries(swiftDemangle PRIVATE
87
swiftDemangling)
98

0 commit comments

Comments
 (0)