Files
swift-mirror/test/ModuleInterface/infer-arch-from-file.swift
Xi Ge 49c64cf902 ModuleInterface: sanitize arch when interface file name and encoded flags disagree
It's a known issue that we are using arm64e interfaces contents for the arm64 target,
meaning the encoded module flags are specifying -target arm64e-x-x instead of
-target arm64-x-x. Fortunately, we can tell the target arch from the interface file
name, so we could sanitize the target to use by inferring arch from the file name.
2021-06-16 22:20:55 -07:00

12 lines
464 B
Swift

// RUN: %empty-directory(%t)
// RUN: %empty-directory(%t/Bar.swiftmodule)
// RUN: echo "// swift-interface-format-version: 1.0" > %t/arm64.swiftinterface
// RUN: echo "// swift-module-flags: -module-name arm64 -target arm64e-apple-macos11.0" >> %t/arm64.swiftinterface
import arm64
// RUN: %target-swift-frontend -scan-dependencies %s -o %t/deps.json -I %t -target arm64-apple-macos11.0
// RUN: %FileCheck %s < %t/deps.json
// CHECK-NOT: arm64e-apple-macos11.0