Skip to content

Commit 3cfbb34

Browse files
committed
---
yaml --- r: 345468 b: refs/heads/master c: 340e156 h: refs/heads/master
1 parent 8593ad0 commit 3cfbb34

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
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: 1cd82d5aa77b68dd77b8e3b09b0a6ce23a5c03cd
2+
refs/heads/master: 340e1567ededcaa2f5bf681a432fecd8e18828c7
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/tools/SourceKit/CMakeLists.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ if("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin" AND NOT CMAKE_CROSSCOMPILING)
3535
endif()
3636

3737
# If we were don't have XPC, just build inproc.
38-
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin" AND NOT HAVE_XPC_H)
38+
if(NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin" OR NOT HAVE_XPC_H)
3939
set(SWIFT_SOURCEKIT_USE_INPROC_LIBRARY TRUE)
4040
endif()
4141

@@ -95,12 +95,11 @@ include_directories(BEFORE
9595
${SOURCEKIT_BINARY_DIR}/tools/SourceKit/include
9696
)
9797

98-
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
99-
set(SOURCEKIT_DEFAULT_TARGET_SDK "LINUX")
98+
if(NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
99+
string(TOUPPER "${CMAKE_SYSTEM_NAME}" SOURCEKIT_DEFAULT_TARGET_SDK)
100100
set(SOURCEKIT_NEED_EXPLICIT_LIBDISPATCH TRUE)
101101

102102
if(SWIFT_BUILD_SOURCEKIT)
103-
104103
include(ExternalProject)
105104
ExternalProject_Add(libdispatch
106105
SOURCE_DIR

trunk/tools/SourceKit/cmake/modules/AddSwiftSourceKit.cmake

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,13 @@ function(add_sourcekit_default_compiler_flags target)
6969
# TODO(compnerd) this should really use target_compile_options but the use
7070
# of keyword and non-keyword flags prevents this
7171
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
72-
list(APPEND c_compile_flags "-fblocks")
72+
list(APPEND c_compile_flags -fblocks)
73+
elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
74+
if(SWIFT_COMPILER_IS_MSVC_LIKE)
75+
list(APPEND c_compile_flags -Xclang;-fblocks)
76+
else()
77+
list(APPEND c_compile_flags -fblocks)
78+
endif()
7379
endif()
7480

7581
# Convert variables to space-separated strings.

0 commit comments

Comments
 (0)