Files
swift-mirror/test/Serialization/clang-target-option.swift
Dave Lee bbbaa0abcd [Explicit Module Builds] Serialize --target= flag instead of -triple (#71987)
Serialize a `--target=` flag (a driver option) instead of `-triple` (a frontend 
option). The `XCC` values are passed as driver flags, where `-triple` is not defined.

The target is passed as a joined flag and value, which is more convenient for lldb to 
consume.
2024-02-29 15:27:10 -08:00

11 lines
588 B
Swift

// RUN: %empty-directory(%t)
// RUN: %target-swift-frontend -emit-module -module-name ClangTargetModule -emit-module-path %t/has_clang_target.swiftmodule -parse-as-library -serialize-debugging-options -clang-target arm64e-apple-macos12.12 %s
// Check the serialized flags paths.
// RUN: llvm-bcanalyzer -dump %t/has_clang_target.swiftmodule > %t/has_clang_target.swiftmodule.txt
// RUN: %FileCheck %s < %t/has_clang_target.swiftmodule.txt
// CHECK-LABEL: <OPTIONS_BLOCK
// CHECK: <XCC abbrevid={{[0-9]+}}/> blob data = '--target=arm64e-apple-macos12.12'
// CHECK: </OPTIONS_BLOCK>