mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
This will enable users to try out the '-enable-ossa-modules' flag if their compiler supports it and get OSSA code on all inlinable code that they use. The idea is that this is a nice way to stage this in and get more testing. The specific implementation is that the module interface loader: 1. Knows if enable ossa modules is enabled not to search for any compiled modules. We always rebuild from the interface file on the system. 2. Knows that if enable ossa modules is enabled to mixin a bit into the module interface loader cache hash to ensure that we consider the specialized ossa compiled modules to be different than the modules in that cache from the system. This ensures that when said flag is enabled, the user transparently gets all their code in OSSA form from transparent libraries.
17 lines
668 B
INI
17 lines
668 B
INI
# Make a local copy of the substitutions.
|
|
config.substitutions = list(config.substitutions)
|
|
|
|
swift_build_sdk_interfaces_base = (r'env SWIFT_EXEC=%%swiftc_driver_plain %r '
|
|
r'%%utils/swift_build_sdk_interfaces.py '
|
|
% (sys.executable,))
|
|
|
|
swift_build_sdk_interfaces = swift_build_sdk_interfaces_base + '%mcp_opt'
|
|
|
|
config.substitutions.insert(0, ('%swift_build_sdk_interfaces_base',
|
|
swift_build_sdk_interfaces_base))
|
|
|
|
config.substitutions.insert(0, ('%swift_build_sdk_interfaces',
|
|
swift_build_sdk_interfaces))
|
|
|
|
config.suffixes.add('.py')
|