@@ -1564,6 +1564,7 @@ function Build-CMakeProject {
1564
1564
Add-KeyValueIfNew $Defines CMAKE_Swift_COMPILER_WORKS " YES"
1565
1565
}
1566
1566
1567
+ # FIXME(compnerd) remove this once the old runtimes build path is removed.
1567
1568
Add-KeyValueIfNew $Defines SWIFT_ANDROID_NDK_PATH " $AndroidNDKPath "
1568
1569
1569
1570
$SWIFTC = if ($UseBuiltCompilers.Contains (" Swift" )) {
@@ -1611,6 +1612,12 @@ function Build-CMakeProject {
1611
1612
Add-FlagsDefine $Defines CMAKE_SHARED_LINKER_FLAGS " --ld-path=$ld "
1612
1613
Add-FlagsDefine $Defines CMAKE_EXE_LINKER_FLAGS " --ld-path=$ld "
1613
1614
}
1615
+
1616
+ # TODO(compnerd) we should understand why CMake does not understand
1617
+ # that the object file format is ELF when targeting Android on Windows.
1618
+ # This indication allows it to understand that it can use `chrpath` to
1619
+ # change the RPATH on the dynamic libraries.
1620
+ Add-FlagsDefine $Defines CMAKE_EXECUTABLE_FORMAT " ELF"
1614
1621
}
1615
1622
}
1616
1623
@@ -2815,7 +2822,6 @@ function Build-XCTest([Hashtable] $Platform) {
2815
2822
- SwiftSDK (Get-SwiftSDK $Platform.OS ) `
2816
2823
- Defines @ {
2817
2824
BUILD_SHARED_LIBS = " YES" ;
2818
- CMAKE_BUILD_WITH_INSTALL_RPATH = " YES" ;
2819
2825
CMAKE_INSTALL_BINDIR = $Platform.BinaryDir ;
2820
2826
ENABLE_TESTING = " NO" ;
2821
2827
dispatch_DIR = $ (Get-ProjectCMakeModules $Platform Dispatch);
@@ -2839,7 +2845,6 @@ function Test-XCTest {
2839
2845
- SwiftSDK $null `
2840
2846
- BuildTargets default , check- xctest `
2841
2847
- Defines @ {
2842
- CMAKE_BUILD_WITH_INSTALL_RPATH = " YES" ;
2843
2848
CMAKE_Swift_FLAGS = @ (" -resource-dir" , $SwiftRuntimeDirectory , " -vfsoverlay" , " ${RuntimeBinaryCache} \stdlib\windows-vfs-overlay.yaml" );
2844
2849
ENABLE_TESTING = " YES" ;
2845
2850
dispatch_DIR = $ (Get-ProjectCMakeModules $BuildPlatform Dispatch);
@@ -2862,7 +2867,6 @@ function Build-Testing([Hashtable] $Platform) {
2862
2867
- SwiftSDK (Get-SwiftSDK $Platform.OS ) `
2863
2868
- Defines @ {
2864
2869
BUILD_SHARED_LIBS = " YES" ;
2865
- CMAKE_BUILD_WITH_INSTALL_RPATH = " YES" ;
2866
2870
CMAKE_INSTALL_BINDIR = $Platform.BinaryDir ;
2867
2871
dispatch_DIR = (Get-ProjectCMakeModules $Platform Dispatch);
2868
2872
Foundation_DIR = (Get-ProjectCMakeModules $Platform DynamicFoundation);
0 commit comments