diff options
author | 2016-06-21 20:54:05 +0000 | |
---|---|---|
committer | 2016-06-22 10:46:56 +0000 | |
commit | ce41ba93fda912e25de2cd27d2b8a9e9a670b406 (patch) | |
tree | f5cef8a9bf28d0f69d53ffb238289f2c93aa5375 /src/main/java/com/google/devtools/build/lib/rules/objc | |
parent | b17ebeeb7c8546b02b397e9e6bc83825d14663ff (diff) |
Make module maps generation conditional for native Swift rules.
* This fixes a crash when a target has both a bridging header and a
* module map
RELNOTES: Native Swift rules no longer pull in module maps unconditionally.
Use --experimental_objc_enable_module_maps for that.
--
MOS_MIGRATED_REVID=125491042
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/objc')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/objc/CompilationSupport.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/CompilationSupport.java b/src/main/java/com/google/devtools/build/lib/rules/objc/CompilationSupport.java index 002d980837..b2c5be01d8 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/objc/CompilationSupport.java +++ b/src/main/java/com/google/devtools/build/lib/rules/objc/CompilationSupport.java @@ -688,6 +688,8 @@ public final class CompilationSupport { PathFragment moduleMapPath = intermediateArtifacts.moduleMap().getArtifact().getExecPath(); commandLine.add("-I").add(moduleMapPath.getParentDirectory().toString()); commandLine.add("-import-underlying-module"); + + inputHeaders.addAll(objcProvider.get(MODULE_MAP)); } commandLine.add(commonFrameworkFlags(objcProvider, appleConfiguration)); @@ -702,7 +704,6 @@ public final class CompilationSupport { .addInputs(otherSwiftSources) .addInputs(inputHeaders.build()) .addTransitiveInputs(objcProvider.get(HEADER)) - .addTransitiveInputs(objcProvider.get(MODULE_MAP)) .addOutput(objFile) .addOutput(intermediateArtifacts.swiftModuleFile(sourceFile)) .build(ruleContext)); |