Commit Graph

16 Commits

Author SHA1 Message Date
Alex Denisov
6cbf8abf59 Swift: do not trace codesign binary 2023-12-18 14:24:07 +01:00
Paolo Tranquilli
e25a655509 Swift: fix Linux compatibility problem and fetch resource dir from toolchain
This fetches the resource directory directly from the released
toolchains, allowing us to stop prebuilding and assembling them.
Moreover insertion of our resource directory is moved to the lua
tracing configuration (solving a `TODO`) and enhanced. Now all options
that start with the original resource directory (either explicit or
implied) are redirected to our resource directory.

This solves a problem where `-I <original resource dir>/some/path` was
passed to the extractor and did not work.

This works around the 5.9 linux compatibility problem by including the
`PackageDescription` swift modules in the in-dist toolchain. Copying the
toolchain and fixing the `-I` flag was not enough as for some reason
compilation of `PackageDescription.swiftinterface`  was causing a crash
in the SIL pass. We work around that by pre-compiling those modules
during the build and  including `.swiftmodule` files in the resource
directory.

TODO (apart from testing):
* the libraries included in the macOS toolchain are now fat (they were
  intel only before), occupying more space. We should see if we need to
  trim them down.
* there might be other swiftinterface files causing problems on linux
  lurking around...
* if we go with this, we can simplify and trim down the prebuilding we
  do leaving out the resource directory.
2023-10-31 16:20:58 +01:00
Paolo Tranquilli
c945d65b2d Swift: add clang ignored flag 2023-06-14 16:17:44 +02:00
Alex Denisov
b71c5e6c4b Swift: ignore sandbox-exec 2023-01-30 15:10:30 +01:00
Alex Denisov
63b4e5ef5c Swift: do not trace lsregister 2023-01-17 09:26:31 +01:00
Paolo Tranquilli
d419749eb2 Swift: fix missing extraction of function bodies in SPM builds
For some reason `-experimental-skip-non-inlinable-function-bodies-without-types`
is passed to the frontend, which will skip extraction of most bodies.

By suppressing that option the problem goes away.
2022-10-24 17:11:13 +02:00
Josh Soref
480f1e24af spelling: unsupported
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2022-10-13 19:43:27 -04:00
Alex Denisov
d9cfd06a88 Swift: do not skip newly supported CLI args 2022-09-22 11:17:07 +02:00
Alex Denisov
dafa9d24f1 Swift: skip one more unsupported CLI arg 2022-09-20 15:04:54 +02:00
Alex Denisov
2b12aece63 Swift: skip more unsupported CLI args (new in Xcode 14) 2022-09-16 09:24:20 +02:00
Alex Denisov
4d81206a87 Swift: teach extractor to emit build artifacts for later consumption 2022-06-29 10:58:24 +02:00
AlexDenisov
304f58b12c Update swift/tools/tracing-config.lua
Co-authored-by: Paolo Tranquilli <redsun82@github.com>
2022-06-20 11:22:13 +02:00
AlexDenisov
f1786f4d6b Apply suggestions from code review
Co-authored-by: Cornelius Riemenschneider <cornelius@github.com>
2022-06-20 07:29:10 +02:00
Alex Denisov
97c38d9d2d Swift: extend tracer config to handle -resource-dir and drop unsupported CLI args 2022-06-17 14:19:12 +02:00
Cornelius Riemenschneider
3836d1550a Update Lua tracing configs. 2022-05-17 13:18:28 +00:00
Alex Denisov
5b75b4db79 Swift: add tracer config 2022-04-28 13:17:35 +02:00