Skip to content

DNM: all android changes 2 testing #74027

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 28 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
e9d822c
[android] squash all android changes
hyp Mar 27, 2024
9fdd035
Merge remote-tracking branch 'me/branch/android-complete' into HEAD
hyp May 8, 2024
c9733ba
stdlib: fix android build
hyp May 9, 2024
5c8c180
Merge remote-tracking branch 'origin/main' into HEAD
hyp May 9, 2024
f092973
do not add ObjectIdentifier+DebugDescription.swift for android builds
hyp May 9, 2024
ba71973
more cross-arch build.ps1 android fixes
hyp May 14, 2024
bcf20ad
Merge remote-tracking branch 'origin/main' into HEAD
hyp May 16, 2024
d6a152f
Merge remote-tracking branch 'origin/main' into HEAD
hyp May 22, 2024
d920f70
Merge remote-tracking branch 'origin/main' into HEAD
hyp May 28, 2024
95493f6
[android] add a module map for Android NDK
hyp Mar 27, 2024
57b89d5
[android] add an android NDK Swift overlay module, and use it instead…
hyp Mar 27, 2024
0f9a69c
android test fixes
hyp May 4, 2024
420e03f
add one more concurrency test fix
hyp May 9, 2024
95209ca
update tests to use canImport(android) and make libc test for general…
hyp May 9, 2024
a99b374
[android] Update tests to use new Android overlay and disable stdlib/…
finagolfin May 12, 2024
d7de7c6
Fix canImport android
hyp May 27, 2024
6077662
drop android stuff
hyp May 28, 2024
664f332
Android: do not re-export macros from linux/stat.h from other modules
hyp May 28, 2024
6bcd9ef
Android: do not re-export macros from linux/stat.h from other modules
hyp May 28, 2024
57cc643
Android: do not re-export macros from linux/stat.h from other modules
hyp May 28, 2024
6b97147
[android] add a module map for Android NDK
hyp Mar 27, 2024
6a1d703
Merge commit '664f3329947dbfd199c72b6511240bf2ccfc245e' into HEAD
hyp May 30, 2024
86ba251
fix canImport clause in the MathConstants.swift testcase
hyp May 31, 2024
8b8c72a
[stdlib] add a _math module overlay for Android for deprecated constants
hyp Jun 4, 2024
9c31f98
[cmake] fix android header name targets
hyp Jun 4, 2024
e9739d7
remove additional glibc android check from cmake
hyp Jun 4, 2024
273edcf
build CxxStdlib for Android too
hyp Jun 4, 2024
def3f59
Merge remote-tracking branch 'me/eng/android/ndk-overlay' into HEAD
hyp Jun 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions cmake/caches/Runtime-Android-i686.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@

set(SWIFT_HOST_VARIANT_SDK ANDROID CACHE STRING "")
set(SWIFT_HOST_VARIANT_ARCH i686 CACHE STRING "")

# NOTE(compnerd) disable the tools, we are trying to build just the standard
# library.
set(SWIFT_INCLUDE_TOOLS NO CACHE BOOL "")

# NOTE(compnerd) cannot build tests since the tests require the toolchain
set(SWIFT_INCLUDE_TESTS NO CACHE BOOL "")

# NOTE(compnerd) cannot build docs since that requires perl
set(SWIFT_INCLUDE_DOCS NO CACHE BOOL "")

# NOTE(compnerd) these are part of the toolchain, not the runtime.
set(SWIFT_BUILD_SOURCEKIT NO CACHE BOOL "")

# NOTE(compnerd) build with the compiler specified, not a just built compiler.
set(SWIFT_BUILD_RUNTIME_WITH_HOST_COMPILER YES CACHE BOOL "")

set(SWIFT_SDK_ANDROID_ARCHITECTURES i686 CACHE STRING "")

# NOTE(compnerd) this is lollipop, which seems to still have decent usage.
set(SWIFT_ANDROID_API_LEVEL 21 CACHE STRING "")
24 changes: 24 additions & 0 deletions cmake/caches/Runtime-Android-x86_64.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@

set(SWIFT_HOST_VARIANT_SDK ANDROID CACHE STRING "")
set(SWIFT_HOST_VARIANT_ARCH x86_64 CACHE STRING "")

# NOTE(compnerd) disable the tools, we are trying to build just the standard
# library.
set(SWIFT_INCLUDE_TOOLS NO CACHE BOOL "")

# NOTE(compnerd) cannot build tests since the tests require the toolchain
set(SWIFT_INCLUDE_TESTS NO CACHE BOOL "")

# NOTE(compnerd) cannot build docs since that requires perl
set(SWIFT_INCLUDE_DOCS NO CACHE BOOL "")

# NOTE(compnerd) these are part of the toolchain, not the runtime.
set(SWIFT_BUILD_SOURCEKIT NO CACHE BOOL "")

# NOTE(compnerd) build with the compiler specified, not a just built compiler.
set(SWIFT_BUILD_RUNTIME_WITH_HOST_COMPILER YES CACHE BOOL "")

set(SWIFT_SDK_ANDROID_ARCHITECTURES x86_64 CACHE STRING "")

# NOTE(compnerd) this is lollipop, which seems to still have decent usage.
set(SWIFT_ANDROID_API_LEVEL 21 CACHE STRING "")
7 changes: 7 additions & 0 deletions include/swift/AST/SearchPathOptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,8 @@ class SearchPathOptions {
std::optional<std::string> VCToolsRoot = std::nullopt;
std::optional<std::string> VCToolsVersion = std::nullopt;

std::optional<StringRef> SysRoot = std::nullopt;

public:
StringRef getSDKPath() const { return SDKPath; }

Expand Down Expand Up @@ -415,6 +417,11 @@ class SearchPathOptions {
VCToolsVersion = version;
}

std::optional<StringRef> getSysRoot() const { return SysRoot; }
void setSysRoot(StringRef sysroot) {
SysRoot = sysroot;
}

ArrayRef<std::string> getImportSearchPaths() const {
return ImportSearchPaths;
}
Expand Down
7 changes: 7 additions & 0 deletions include/swift/Option/Options.td
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,13 @@ def visualc_tools_version : Separate<["-"], "visualc-tools-version">,
SwiftSymbolGraphExtractOption, SwiftAPIDigesterOption]>,
HelpText<"VisualC++ ToolSet Version">, MetaVarName<"<version>">;

// Android Options

def sysroot : Separate<["-"], "sysroot">,
Flags<[ArgumentIsPath, FrontendOption, SwiftAPIExtractOption,
SwiftSymbolGraphExtractOption, SwiftAPIDigesterOption]>,
HelpText<"Native Platform sysroot">, MetaVarName<"<sysroot>">;

// Standard Options
def _DASH_DASH : Option<["--"], "", KIND_REMAINING_ARGS>,
Flags<[FrontendOption, DoesNotAffectIncrementalBuild]>;
Expand Down
35 changes: 22 additions & 13 deletions lib/ClangImporter/ClangIncludePaths.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,12 +175,14 @@ createClangArgs(const ASTContext &ctx, clang::driver::Driver &clangDriver) {
auto sdkPath = ctx.SearchPathOpts.getSDKPath();
if (!sdkPath.empty())
clangDriver.SysRoot = sdkPath.str();
if (auto sysroot = ctx.SearchPathOpts.getSysRoot())
clangDriver.SysRoot = sysroot->str();
return clangDriverArgs;
}

static SmallVector<std::pair<std::string, std::string>, 2>
getLibcFileMapping(ASTContext &ctx, StringRef modulemapFileName,
std::optional<StringRef> maybeHeaderFileName,
std::optional<ArrayRef<StringRef>> maybeHeaderFileNames,
const llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem> &vfs) {
const llvm::Triple &triple = ctx.LangOpts.Target;

Expand Down Expand Up @@ -220,18 +222,20 @@ getLibcFileMapping(ASTContext &ctx, StringRef modulemapFileName,
SmallVector<std::pair<std::string, std::string>, 2> vfsMappings{
{std::string(injectedModuleMapPath), std::string(actualModuleMapPath)}};

if (maybeHeaderFileName) {
// TODO: remove the SwiftGlibc.h header and reference all Glibc headers
// directly from the modulemap.
Path actualHeaderPath = actualModuleMapPath;
llvm::sys::path::remove_filename(actualHeaderPath);
llvm::sys::path::append(actualHeaderPath, maybeHeaderFileName.value());
if (maybeHeaderFileNames) {
for (const auto &filename : *maybeHeaderFileNames) {
// TODO: remove the SwiftGlibc.h header and reference all Glibc headers
// directly from the modulemap.
Path actualHeaderPath = actualModuleMapPath;
llvm::sys::path::remove_filename(actualHeaderPath);
llvm::sys::path::append(actualHeaderPath, filename);

Path injectedHeaderPath(libcDir);
llvm::sys::path::append(injectedHeaderPath, maybeHeaderFileName.value());
Path injectedHeaderPath(libcDir);
llvm::sys::path::append(injectedHeaderPath, filename);

vfsMappings.push_back(
{std::string(injectedHeaderPath), std::string(actualHeaderPath)});
vfsMappings.push_back(
{std::string(injectedHeaderPath), std::string(actualHeaderPath)});
}
}

return vfsMappings;
Expand Down Expand Up @@ -552,9 +556,14 @@ ClangInvocationFileMapping swift::getClangInvocationFileMapping(
} else if (triple.isMusl()) {
libcFileMapping =
getLibcFileMapping(ctx, "musl.modulemap", StringRef("SwiftMusl.h"), vfs);
} else if (triple.isAndroid()) {
// Android uses the android-specific module map that overlays the NDK.
StringRef headerFiles[] = {"SwiftAndroidNDK.h", "SwiftBionic.h"};
libcFileMapping =
getLibcFileMapping(ctx, "android.modulemap", headerFiles, vfs);
} else if (triple.isOSGlibc() || triple.isOSOpenBSD() ||
triple.isOSFreeBSD() || triple.isAndroid()) {
// Android/BSD/Linux Mappings
triple.isOSFreeBSD()) {
// BSD/Linux Mappings
libcFileMapping = getLibcFileMapping(ctx, "glibc.modulemap",
StringRef("SwiftGlibc.h"), vfs);

Expand Down
4 changes: 4 additions & 0 deletions lib/Driver/ToolChains.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,10 @@ void ToolChain::addCommonFrontendArgs(const OutputInfo &OI,
arguments.push_back(inputArgs.MakeArgString(A->getValue()));
}

if (const Arg *A = inputArgs.getLastArg(options::OPT_sysroot)) {
arguments.push_back("-sysroot");
arguments.push_back(inputArgs.MakeArgString(A->getValue()));
}

if (llvm::sys::Process::StandardErrHasColors()) {
arguments.push_back("-color-diagnostics");
Expand Down
3 changes: 3 additions & 0 deletions lib/Frontend/CompilerInvocation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2067,6 +2067,9 @@ static bool ParseSearchPathArgs(SearchPathOptions &Opts, ArgList &Args,
if (const Arg *A = Args.getLastArg(OPT_visualc_tools_version))
Opts.setVCToolsVersion(A->getValue());

if (const Arg *A = Args.getLastArg(OPT_sysroot))
Opts.setSysRoot(A->getValue());

if (const Arg *A = Args.getLastArg(OPT_resource_dir))
Opts.RuntimeResourcePath = A->getValue();

Expand Down
37 changes: 28 additions & 9 deletions stdlib/cmake/modules/AddSwiftStdlib.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -554,13 +554,16 @@ function(_add_target_variant_link_flags)
list(APPEND link_libraries "dl" "log")
# We need to add the math library, which is linked implicitly by libc++
list(APPEND result "-lm")
if(NOT "${SWIFT_ANDROID_NDK_PATH}" STREQUAL "")
if("${SWIFT_ANDROID_NDK_PATH}" MATCHES "r26")
file(GLOB RESOURCE_DIR ${SWIFT_SDK_ANDROID_ARCH_${LFLAGS_ARCH}_PATH}/../lib/clang/*)
else()
file(GLOB RESOURCE_DIR ${SWIFT_SDK_ANDROID_ARCH_${LFLAGS_ARCH}_PATH}/../lib64/clang/*)
if(NOT CMAKE_HOST_SYSTEM MATCHES Windows)
# The Android resource dir is specified from build.ps1 on windows.
if(NOT "${SWIFT_ANDROID_NDK_PATH}" STREQUAL "")
if("${SWIFT_ANDROID_NDK_PATH}" MATCHES "r26")
file(GLOB RESOURCE_DIR ${SWIFT_SDK_ANDROID_ARCH_${LFLAGS_ARCH}_PATH}/../lib/clang/*)
else()
file(GLOB RESOURCE_DIR ${SWIFT_SDK_ANDROID_ARCH_${LFLAGS_ARCH}_PATH}/../lib64/clang/*)
endif()
list(APPEND result "-resource-dir=${RESOURCE_DIR}")
endif()
list(APPEND result "-resource-dir=${RESOURCE_DIR}")
endif()

# link against the custom C++ library
Expand Down Expand Up @@ -1757,6 +1760,9 @@ endfunction()
# SWIFT_MODULE_DEPENDS_WASI
# Swift modules this library depends on when built for WASI.
#
# SWIFT_MODULE_DEPENDS_ANDROID
# Swift modules this library depends on when built for Android.
#
# FRAMEWORK_DEPENDS
# System frameworks this library depends on.
#
Expand Down Expand Up @@ -1880,6 +1886,7 @@ function(add_swift_target_library name)
SWIFT_COMPILE_FLAGS_XROS
SWIFT_COMPILE_FLAGS_LINUX
SWIFT_MODULE_DEPENDS
SWIFT_MODULE_DEPENDS_ANDROID
SWIFT_MODULE_DEPENDS_CYGWIN
SWIFT_MODULE_DEPENDS_FREEBSD
SWIFT_MODULE_DEPENDS_FREESTANDING
Expand Down Expand Up @@ -2091,12 +2098,15 @@ function(add_swift_target_library name)
elseif(sdk STREQUAL "OPENBSD")
list(APPEND swiftlib_module_depends_flattened
${SWIFTLIB_SWIFT_MODULE_DEPENDS_OPENBSD})
elseif(sdk STREQUAL "LINUX" OR sdk STREQUAL "ANDROID")
elseif(sdk STREQUAL "LINUX")
list(APPEND swiftlib_module_depends_flattened
${SWIFTLIB_SWIFT_MODULE_DEPENDS_LINUX})
elseif(sdk STREQUAL "LINUX_STATIC")
list(APPEND swiftlib_module_depends_flattened
${SWIFTLIB_SWIFT_MODULE_DEPENDS_LINUX_STATIC})
elseif(sdk STREQUAL "ANDROID")
list(APPEND swiftlib_module_depends_flattened
${SWIFTLIB_SWIFT_MODULE_DEPENDS_ANDROID})
elseif(sdk STREQUAL "CYGWIN")
list(APPEND swiftlib_module_depends_flattened
${SWIFTLIB_SWIFT_MODULE_DEPENDS_CYGWIN})
Expand Down Expand Up @@ -2920,6 +2930,7 @@ function(add_swift_target_executable name)
DEPENDS
LINK_LIBRARIES
SWIFT_MODULE_DEPENDS
SWIFT_MODULE_DEPENDS_ANDROID
SWIFT_MODULE_DEPENDS_CYGWIN
SWIFT_MODULE_DEPENDS_FREEBSD
SWIFT_MODULE_DEPENDS_FREESTANDING
Expand Down Expand Up @@ -3030,12 +3041,15 @@ function(add_swift_target_executable name)
elseif(sdk STREQUAL "OPENBSD")
list(APPEND swiftexe_module_depends_flattened
${SWIFTEXE_TARGET_SWIFT_MODULE_DEPENDS_OPENBSD})
elseif(sdk STREQUAL "LINUX" OR sdk STREQUAL "ANDROID")
elseif(sdk STREQUAL "LINUX")
list(APPEND swiftexe_module_depends_flattened
${SWIFTEXE_TARGET_SWIFT_MODULE_DEPENDS_LINUX})
elseif(sdk STREQUAL "LINUX_STATIC")
list(APPEND swiftexe_module_depends_flattened
${SWIFTEXE_TARGET_SWIFT_MODULE_DEPENDS_LINUX_STATIC})
elseif(sdk STREQUAL "ANDROID")
list(APPEND swiftexe_module_depends_flattened
${SWIFTEXE_TARGET_SWIFT_MODULE_DEPENDS_ANDROID})
elseif(sdk STREQUAL "CYGWIN")
list(APPEND swiftexe_module_depends_flattened
${SWIFTEXE_TARGET_SWIFT_MODULE_DEPENDS_CYGWIN})
Expand Down Expand Up @@ -3133,9 +3147,14 @@ function(add_swift_target_executable name)
# it tries to build swift-backtrace it fails because *the compiler*
# refers to a libswiftCore.so that can't be found.

if(SWIFTEXE_TARGET_NOSWIFTRT)
set(NOSWIFTRT_KEYWORD "NOSWIFTRT")
else()
set(NOSWIFTRT_KEYWORD "")
endif()
_add_swift_target_executable_single(
${VARIANT_NAME}
${SWIFTEXE_TARGET_NOSWIFTRT_keyword}
${NOSWIFTRT_KEYWORD}
${SWIFTEXE_TARGET_SOURCES}
DEPENDS
${SWIFTEXE_TARGET_DEPENDS_with_suffix}
Expand Down
1 change: 1 addition & 0 deletions stdlib/private/RuntimeUnittest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ add_swift_target_library(swiftRuntimeUnittest ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES
ExclusivityTests.cpp

SWIFT_MODULE_DEPENDS StdlibUnittest
SWIFT_MODULE_DEPENDS_ANDROID Android
SWIFT_MODULE_DEPENDS_LINUX Glibc
SWIFT_MODULE_DEPENDS_FREEBSD Glibc
SWIFT_MODULE_DEPENDS_OPENBSD Glibc
Expand Down
1 change: 1 addition & 0 deletions stdlib/private/StdlibCollectionUnittest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ add_swift_target_library(swiftStdlibCollectionUnittest ${SWIFT_STDLIB_LIBRARY_BU
WriteBackMutableSlice.swift

SWIFT_MODULE_DEPENDS StdlibUnittest
SWIFT_MODULE_DEPENDS_ANDROID Android
SWIFT_MODULE_DEPENDS_LINUX Glibc
SWIFT_MODULE_DEPENDS_FREEBSD Glibc
SWIFT_MODULE_DEPENDS_OPENBSD Glibc
Expand Down
1 change: 1 addition & 0 deletions stdlib/private/StdlibUnicodeUnittest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ add_swift_target_library(swiftStdlibUnicodeUnittest ${SWIFT_STDLIB_LIBRARY_BUILD
WordBreaking.swift

SWIFT_MODULE_DEPENDS StdlibUnittest
SWIFT_MODULE_DEPENDS_ANDROID Android
SWIFT_MODULE_DEPENDS_LINUX Glibc
SWIFT_MODULE_DEPENDS_FREEBSD Glibc
SWIFT_MODULE_DEPENDS_OPENBSD Glibc
Expand Down
1 change: 1 addition & 0 deletions stdlib/private/StdlibUnittest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ add_swift_target_library(swiftStdlibUnittest ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES}
SWIFT_MODULE_DEPENDS_XROS ${swift_stdlib_unittest_darwin_dependencies}
SWIFT_MODULE_DEPENDS_MACCATALYST ${swift_stdlib_unittest_darwin_dependencies}
SWIFT_MODULE_DEPENDS_FREESTANDING "${SWIFT_FREESTANDING_TEST_DEPENDENCIES}"
SWIFT_MODULE_DEPENDS_ANDROID Android
SWIFT_MODULE_DEPENDS_LINUX Glibc
SWIFT_MODULE_DEPENDS_FREEBSD Glibc
SWIFT_MODULE_DEPENDS_OPENBSD Glibc
Expand Down
2 changes: 2 additions & 0 deletions stdlib/private/StdlibUnittest/RaceTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ import Darwin
import Glibc
#elseif canImport(Musl)
import Musl
#elseif canImport(Android)
import Android
#elseif os(WASI)
import WASILibc
#elseif os(Windows)
Expand Down
2 changes: 2 additions & 0 deletions stdlib/private/StdlibUnittest/StdlibCoreExtras.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ import Darwin
import Glibc
#elseif canImport(Musl)
import Musl
#elseif canImport(Android)
import Android
#elseif os(WASI)
import WASILibc
#elseif os(Windows)
Expand Down
2 changes: 2 additions & 0 deletions stdlib/private/StdlibUnittest/StdlibUnittest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ import Darwin
import Glibc
#elseif canImport(Musl)
import Musl
#elseif canImport(Android)
import Android
#elseif os(WASI)
import WASILibc
#elseif os(Windows)
Expand Down
1 change: 1 addition & 0 deletions stdlib/private/SwiftPrivate/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ add_swift_target_library(swiftSwiftPrivate ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES} I
SWIFT_MODULE_DEPENDS_WATCHOS ${swift_swiftprivate_darwin_depencencies}
SWIFT_MODULE_DEPENDS_MACCATALYST ${swift_swiftprivate_darwin_depencencies}
SWIFT_MODULE_DEPENDS_FREESTANDING "${SWIFT_FREESTANDING_TEST_DEPENDENCIES}"
SWIFT_MODULE_DEPENDS_ANDROID Android
SWIFT_MODULE_DEPENDS_LINUX Glibc
SWIFT_MODULE_DEPENDS_LINUX_STATIC Musl
SWIFT_MODULE_DEPENDS_FREEBSD Glibc
Expand Down
2 changes: 2 additions & 0 deletions stdlib/private/SwiftPrivate/IO.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ import Darwin
import Glibc
#elseif canImport(Musl)
import Musl
#elseif canImport(Android)
import Android
#elseif canImport(WASILibc)
import WASILibc
#endif
Expand Down
1 change: 1 addition & 0 deletions stdlib/private/SwiftPrivateLibcExtras/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ add_swift_target_library(swiftSwiftPrivateLibcExtras ${SWIFT_STDLIB_LIBRARY_BUIL
SWIFT_MODULE_DEPENDS_XROS ${swift_private_libc_extras_darwin_depencencies}
SWIFT_MODULE_DEPENDS_MACCATALYST ${swift_private_libc_extras_darwin_depencencies}
SWIFT_MODULE_DEPENDS_FREESTANDING "${SWIFT_FREESTANDING_TEST_DEPENDENCIES}"
SWIFT_MODULE_DEPENDS_ANDROID Android
SWIFT_MODULE_DEPENDS_LINUX Glibc
SWIFT_MODULE_DEPENDS_LINUX_STATIC Musl
SWIFT_MODULE_DEPENDS_FREEBSD Glibc
Expand Down
2 changes: 2 additions & 0 deletions stdlib/private/SwiftPrivateLibcExtras/Subprocess.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ import Darwin
import Glibc
#elseif canImport(Musl)
import Musl
#elseif canImport(Android)
import Android
#elseif os(WASI)
import WASILibc
#elseif os(Windows)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ import Darwin
import Glibc
#elseif canImport(Musl)
import Musl
#elseif canImport(Android)
import Android
#elseif os(WASI)
import WASILibc
#elseif os(Windows)
Expand Down
1 change: 1 addition & 0 deletions stdlib/private/SwiftPrivateThreadExtras/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ add_swift_target_library(swiftSwiftPrivateThreadExtras ${SWIFT_STDLIB_LIBRARY_BU
SWIFT_MODULE_DEPENDS_XROS ${swift_private_thread_extras_darwin_depencencies}
SWIFT_MODULE_DEPENDS_MACCATALYST ${swift_private_thread_extras_darwin_depencencies}
SWIFT_MODULE_DEPENDS_FREESTANDING "${SWIFT_FREESTANDING_TEST_DEPENDENCIES}"
SWIFT_MODULE_DEPENDS_ANDROID Android
SWIFT_MODULE_DEPENDS_LINUX Glibc
SWIFT_MODULE_DEPENDS_LINUX_STATIC Musl
SWIFT_MODULE_DEPENDS_FREEBSD Glibc
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ import Darwin
import Glibc
#elseif canImport(Musl)
import Musl
#elseif canImport(Android)
import Android
#elseif os(WASI)
import WASILibc
#elseif os(Windows)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ import Darwin
import Glibc
#elseif canImport(Musl)
import Musl
#elseif canImport(Android)
import Android
#elseif os(WASI)
import WASILibc
#elseif os(Windows)
Expand Down
Loading