swift
3f0eb8ce - Frontend: Fix -target-variant subarch normalization.

Commit
206 days ago
Frontend: Fix -target-variant subarch normalization. In https://github.com/swiftlang/swift/pull/77156, normalization was introduced for -target-variant triples. That PR also caused -target-variant arguments to be inherited from the main compilation options whenever building dependency modules from their interfaces, which is incorrect. The -target-variant option must only be specified when compiling a "zippered" module, but the dependencies of zippered modules are not necessarily zippered themselves and indiscriminantly propagating the option can cause miscompilation. The new, more targeted approach to normalizing arm64e triples simply uses the arch and subarch of the -target argument of the main compile to decide whether the subarch of both the -target and -target-variant arguments of a dependency need adjustment. Resolves rdar://135322077 and rdar://141640919.
Author
Committer
Parents
  • include/swift/Serialization
    • File
      SerializedModuleLoader.h
  • lib
    • Frontend
      • File
        ModuleInterfaceLoader.cpp
    • Serialization
      • File
        SerializedModuleLoader.cpp
  • test/ScanDependencies
    • Inputs/target-normalization
      • iOSSupport/Unzippered.swiftmodule
        • arm64e-apple-ios-macabi.swiftinterface
      • macOS
        • Unzippered.swiftmodule
          • arm64e-apple-macos.swiftinterface
        • Zippered.swiftmodule
          • arm64e-apple-ios-macabi.swiftinterface
          • arm64e-apple-macos.swiftinterface
    • File
      target_normalization.swift
    • File
      target_normalization_maccatalyst.swift
    • File
      target_normalization_maccatalyst_zippered.swift