Commit Graph

11 Commits

Author SHA1 Message Date
Butta
26aafe66f6 [android] Fix some tests and a doc flag
Use off_t for a recently failing stdlib test, remove Python hacks for some
tests that now work without them, and correct build flag in the docs.
2022-02-14 03:02:04 +05:30
Argyrios Kyrtzidis
a9f497d20c [utils/swift_build_sdk_interfaces.py] Remove passing '-track-system-dependencies' when prebuilding modules from the interfaces
Including all the system header dependencies and `stat`ing them all the time introduces significant performance overhead for normal compilation, and other features like code-completion, without being worth it in practice.
2020-10-21 17:12:23 -07:00
Xi Ge
b9ade70c5d swift_build_sdk_interfaces.py: create directory under dry-run mode
Users may install a different version of SDK from the one found in the
originally downloaded toolchain. Thus, we may need to create a new directory structure
instead of using the original one in the toolchain, especially if the SDK under use has a
different version number.

rdar://67951012
2020-10-16 13:54:26 -07:00
Xi Ge
e97a6ffb01 swift_build_sdk_interfaces.py: copy SDK build version file into prebuilt module cache directory
This could help us track which version of SDK the module cache were built from.
2020-09-03 18:16:45 -07:00
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