Skip to content

Commit e651198

Browse files
committed
---
yaml --- r: 345565 b: refs/heads/master c: 14fb887 h: refs/heads/master i: 345563: 263e2f7
1 parent f0230d1 commit e651198

File tree

5 files changed

+29
-4
lines changed

5 files changed

+29
-4
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: 809eca0b6378f0e1e6bf8bbc8571a25a3ab5b647
2+
refs/heads/master: 14fb887eb9cb54211efd0e221e03250fba341f75
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: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,11 @@ function(_add_variant_link_flags)
416416
endif()
417417
swift_windows_lib_for_arch(${LFLAGS_ARCH} ${LFLAGS_ARCH}_LIB)
418418
list(APPEND library_search_directories ${${LFLAGS_ARCH}_LIB})
419+
420+
# NOTE(compnerd) workaround incorrectly extensioned import libraries from
421+
# the Windows SDK on case sensitive file systems.
422+
list(APPEND library_search_directories
423+
${CMAKE_BINARY_DIR}/winsdk_lib_${LFLAGS_ARCH}_symlinks)
419424
elseif("${LFLAGS_SDK}" STREQUAL "HAIKU")
420425
list(APPEND result "-lbsd" "-latomic" "-Wl,-Bsymbolic")
421426
elseif("${LFLAGS_SDK}" STREQUAL "ANDROID")

trunk/cmake/modules/SwiftConfigureSDK.cmake

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,26 @@ macro(configure_sdk_windows name environment architectures)
270270
# to the driver -- rely on the `INCLUDE` AND `LIB` environment variables
271271
# instead.
272272
set(SWIFT_SDK_${prefix}_ARCH_${arch}_PATH "/")
273+
274+
# NOTE(compnerd) workaround incorrectly extensioned import libraries from
275+
# the Windows SDK on case sensitive file systems.
276+
swift_windows_arch_spelling(${arch} WinSDKArchitecture)
277+
set(WinSDK${arch}UMDir "$ENV{UniversalCRTSdkDir}/Lib/$ENV{UCRTVersion}/um/${WinSDKArchitecture}")
278+
set(OverlayDirectory "${CMAKE_BINARY_DIR}/winsdk_lib_${arch}_symlinks")
279+
280+
file(MAKE_DIRECTORY ${OverlayDirectory})
281+
282+
file(GLOB libraries RELATIVE "${WinSDK${arch}UMDir}" "${WinSDK${arch}UMDir}/*")
283+
foreach(library ${libraries})
284+
get_filename_component(name_we "${library}" NAME_WE)
285+
get_filename_component(ext "${library}" EXT)
286+
string(TOLOWER "${ext}" lowercase_ext)
287+
set(lowercase_ext_symlink_name "${name_we}${lowercase_ext}")
288+
if(NOT library STREQUAL lowercase_ext_symlink_name)
289+
execute_process(COMMAND
290+
"${CMAKE_COMMAND}" -E create_symlink "${WinSDK${arch}UMDir}/${library}" "${OverlayDirectory}/${lowercase_ext_symlink_name}")
291+
endif()
292+
endforeach()
273293
endforeach()
274294

275295
# Add this to the list of known SDKs.

trunk/lib/ClangImporter/ClangImporter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ getNormalInvocationArguments(std::vector<std::string> &invocationArgStrs,
535535
// using Glibc or a libc that respects that flag. This will cause some
536536
// source breakage however (specifically with strerror_r()) on Linux
537537
// without a workaround.
538-
if (triple.isOSFuchsia()) {
538+
if (triple.isOSFuchsia() || triple.isAndroid()) {
539539
// Many of the modern libc features are hidden behind feature macros like
540540
// _GNU_SOURCE or _XOPEN_SOURCE.
541541
invocationArgStrs.insert(invocationArgStrs.end(), {

trunk/stdlib/public/Platform/tgmath.swift.gyb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,8 +292,8 @@ public func ${bfunc}(_ lhs: ${T}, _ rhs: ${T}) -> ${T} {
292292
% if T == 'Float80':
293293
#if (arch(i386) || arch(x86_64)) && !os(Windows)
294294
% else:
295-
// lgamma not avaialable on Windows, apparently?
296-
#if !os(Windows) && !os(Android)
295+
// lgamma not available on Windows, apparently?
296+
#if !os(Windows)
297297
% end
298298
@_transparent
299299
public func lgamma(_ x: ${T}) -> (${T}, Int) {

0 commit comments

Comments
 (0)