mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Inherit parent's extra Clang arguments when creating an interface build sub-invocation.
We would like to make sure they get propagated to downstream transitive Clang module dependencies also. Resolves rdar://101923680
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
// This test ensures that the parent invocation's '-Xcc X' flags are inherited when building dependency modules
|
||||
// RUN: %empty-directory(%t)
|
||||
|
||||
// Just running a compile is useful to make sure it succeeds because that means the transitive Clang module dependency
|
||||
// received the TANGERINE macro
|
||||
// RUN: %target-swift-frontend -typecheck -strict-implicit-module-context %s -I %S/Inputs/macro-only-module -Xcc -DTANGERINE=1 -disable-implicit-concurrency-module-import -disable-implicit-string-processing-module-import
|
||||
|
||||
// RUN: %target-swift-frontend -scan-dependencies -strict-implicit-module-context %s -o %t/deps.json -I %S/Inputs/macro-only-module -Xcc -DTANGERINE=1 -disable-implicit-concurrency-module-import -disable-implicit-string-processing-module-import
|
||||
// RUN: %FileCheck %s < %t/deps.json
|
||||
|
||||
import ImportsMacroSpecificClangModule
|
||||
|
||||
// CHECK: "directDependencies": [
|
||||
// CHECK-NEXT: {
|
||||
// CHECK-DAG: "swift": "ImportsMacroSpecificClangModule"
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: {
|
||||
// CHECK-DAG: "swift": "Swift"
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: {
|
||||
// CHECK-DAG: "swift": "SwiftOnoneSupport"
|
||||
// CHECK-NEXT: }
|
||||
// CHECK-NEXT: ],
|
||||
|
||||
//CHECK: "swift": "ImportsMacroSpecificClangModule"
|
||||
//CHECK-NEXT: },
|
||||
//CHECK-NEXT: {
|
||||
//CHECK-NEXT: "modulePath": "ImportsMacroSpecificClangModule.swiftmodule",
|
||||
//CHECK-NEXT: "sourceFiles": [
|
||||
//CHECK-NEXT: ],
|
||||
//CHECK-NEXT: "directDependencies": [
|
||||
//CHECK-NEXT: {
|
||||
//CHECK-NEXT: "clang": "OnlyWithMacro"
|
||||
|
||||
// CHECK: "clang": "OnlyWithMacro"
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: {
|
||||
// CHECK-NEXT: "modulePath": "OnlyWithMacro.pcm",
|
||||
// CHECK-NEXT: "sourceFiles": [
|
||||
// CHECK-DAG: "{{.*}}OnlyWithMacro.h"
|
||||
// CHECK-DAG: "{{.*}}module.modulemap"
|
||||
// CHECK-NEXT: ],
|
||||
// CHECK-NEXT: "directDependencies": [
|
||||
// CHECK-NEXT: ],
|
||||
// CHECK-NEXT: "details": {
|
||||
// CHECK-NEXT: "clang": {
|
||||
// CHECK-NEXT: "moduleMapPath": "{{.*}}module.modulemap",
|
||||
// CHECK-NEXT: "contextHash": "{{.*}}",
|
||||
// CHECK-NEXT: "commandLine": [
|
||||
|
||||
// CHECK: "TANGERINE=1",
|
||||
Reference in New Issue
Block a user