Commit Graph

7 Commits

Author SHA1 Message Date
Xi Ge
dbd16d2e05 swift_build_sdk_interfaces.py: adjust output directory path to an SDK-versioned directory
When clients specify an output directory without SDK version, the script will change
the input so we emit all prebuilt module caches into SDK-versioned directories without
modifying the client side.

rdar://67951012
2020-08-28 21:58:37 -07:00
Saleem Abdulrasool
f7ee082210 test: improve Python3 compatibility for swift_build_sdk_interfaces
Return a "unicode" "string" (UTF-8 decoded data) rather than a
bytes-like object as the rest of the script expects the normal unicode
string.
2020-06-30 13:34:52 -07:00
Saleem Abdulrasool
bb3c9457cf test: exit properly with swift_build_sdk_interface
`sys.exit` takes an integral value in the range of `0-127`.  Python 3 is
much more stringent about this and will convert the value if it is out
of the range to 1.  On Windows, explicitly use `ExitProcess` to ensure
that we get the correct value on the exit code which matters to `not`.
2020-06-30 08:19:37 -07:00
Doug Gregor
691633b097 Appease Python linter 2020-04-23 21:33:36 -07:00
Doug Gregor
b27b4d4bb6 [CMake] Use proper module triples for the names of standard library modules.
The standard library (and other Swift modules built by our CMake build system)
has been building module files with an architecture only (e.g., x86_64.swiftmodule)
rather than a proper module triple (x86_86-apple-macosx10.15,
x86_64-apple-ios13.0-simulator, etc.), unlike every other build
system. There are hacks in the compiler and other tools to cope with
this unnecessary build difference. Fix the module file names so we'll
be able to remove the hacks later.

Fixes rdar://problem/49071536.
2020-04-20 21:16:14 -07:00
Butta
14cc620016 [android] A few tweaks for native compilation and to get more tests working
Now that CMAKE_HOST_SYSTEM_NAME and CMAKE_SYSTEM_NAME are set by default to
Android in the Termux app, make the needed tweaks. Some tests were adapted
to work natively on Android too, adds sys/cdefs.h to the Bionic modulemap,
and includes the start of native Android platform support in the build-script.
2019-12-07 01:01:59 +05:30
Jordan Rose
43bb5e4121 swift_build_sdk_interfaces.py: builds compiled modules from an SDK (#25432)
...by crawling it and looking for module interfaces. This is the tool
Apple is using for the "prebuilt-modules" directory in the toolchain
in Xcode.app, which avoids even a first-use cost for importing modules
from Apple SDKs as long as the SDKs haven't changed. We've been
landing changes to support this model on the compiler side, so the
tool to generate the "prebuilt" compiled modules belongs in the
compiler repo too. (In theory this could be used with open-source
toolchains as well, or for alternate SDKs.)
2019-06-17 10:29:11 -07:00