Skip to content

Commit

Permalink
Don't load dumpsyms in configurations.
Browse files Browse the repository at this point in the history
RELNOTES[INC]: Removed --objc_dump_syms_binary.

--
MOS_MIGRATED_REVID=113186554
  • Loading branch information
aragos authored and kchodorow committed Jan 28, 2016
1 parent dfcce0d commit 25b38ac
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 45 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1223,7 +1223,7 @@ private CompilationSupport registerDsymActions() {
.addOutput(debugSymbolFile)
.build(ruleContext));

Artifact dumpsyms = ruleContext.getPrerequisiteArtifact(":dumpsyms", Mode.HOST);
Artifact dumpsyms = ruleContext.getPrerequisiteArtifact("$dumpsyms", Mode.HOST);
Artifact breakpadFile = intermediateArtifacts.breakpadSym();
ruleContext.registerAction(ObjcRuleClasses.spawnOnDarwinActionBuilder()
.setMnemonic("GenBreakpad")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,8 @@

import com.google.common.annotations.VisibleForTesting;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Multimap;
import com.google.devtools.build.lib.Constants;
import com.google.devtools.build.lib.analysis.config.BuildConfiguration.DefaultLabelConverter;
import com.google.devtools.build.lib.analysis.config.BuildOptions;
import com.google.devtools.build.lib.analysis.config.FragmentOptions;
import com.google.devtools.build.lib.cmdline.Label;
import com.google.devtools.build.lib.packages.Attribute.SplitTransition;
import com.google.devtools.build.lib.rules.apple.DottedVersion;
import com.google.devtools.build.lib.rules.apple.DottedVersionConverter;
Expand All @@ -36,13 +32,6 @@
* Command-line options for building Objective-C targets.
*/
public class ObjcCommandLineOptions extends FragmentOptions {
/** Converter for --objc_dump_syms_binary. */
public static class DumpSymsConverter extends DefaultLabelConverter {
public DumpSymsConverter() {
super(Constants.TOOLS_REPOSITORY + "//tools/objc:dump_syms");
}
}

@Option(
name = "ios_simulator_version",
defaultValue = "8.4",
Expand Down Expand Up @@ -98,12 +87,6 @@ public DumpSymsConverter() {
"Don't set this value from the command line - it is derived from ios_multi_cpus only.")
public String iosSplitCpu;

@Option(name = "objc_dump_syms_binary",
defaultValue = "",
category = "undocumented",
converter = DumpSymsConverter.class)
public Label dumpSyms;

@Option(name = "experimental_enable_objc_cc_deps",
defaultValue = "false",
category = "undocumented",
Expand Down Expand Up @@ -181,13 +164,6 @@ public DumpSymsConverter() {

@VisibleForTesting static final String DEFAULT_MINIMUM_IOS = "7.0";

@Override
public void addAllLabels(Multimap<String, Label> labelMap) {
if (generateDebugSymbols) {
labelMap.put("dump_syms", dumpSyms);
}
}

@Override
public List<SplitTransition<BuildOptions>> getPotentialSplitTransitions() {
return ImmutableList.of(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ public class ObjcConfiguration extends BuildConfiguration.Fragment {
// configuration, the late bound attribute will fail to be initialized because it hasn't been
// loaded.
@Nullable private final Label gcovLabel;
@Nullable private final Label dumpSymsLabel;

ObjcConfiguration(ObjcCommandLineOptions objcOptions, BuildConfiguration.Options options,
@Nullable BlazeDirectories directories) {
Expand All @@ -84,7 +83,6 @@ public class ObjcConfiguration extends BuildConfiguration.Fragment {
this.copts = ImmutableList.copyOf(objcOptions.copts);
this.compilationMode = Preconditions.checkNotNull(options.compilationMode, "compilationMode");
this.gcovLabel = options.objcGcovBinary;
this.dumpSymsLabel = objcOptions.dumpSyms;
this.iosSplitCpu = Preconditions.checkNotNull(objcOptions.iosSplitCpu, "iosSplitCpu");
this.fastbuildOptions = ImmutableList.copyOf(objcOptions.fastbuildOptions);
this.enableBinaryStripping = objcOptions.enableBinaryStripping;
Expand Down Expand Up @@ -163,14 +161,6 @@ public List<String> getCopts() {
return gcovLabel;
}

/**
* Returns the label of the dump_syms binary, used to get debug symbols from a binary. Null iff
* !{@link #generateDebugSymbols}.
*/
@Nullable public Label getDumpSymsLabel() {
return dumpSymsLabel;
}

/**
* Whether module map generation and interpretation is enabled.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -776,18 +776,10 @@ public static class LinkingRule implements RuleDefinition {
@Override
public RuleClass build(Builder builder, RuleDefinitionEnvironment env) {
return builder
.add(attr(":dumpsyms", LABEL)
.add(attr("$dumpsyms", LABEL)
.cfg(HOST)
.singleArtifact()
.value(new LateBoundLabel<BuildConfiguration>(ObjcConfiguration.class) {
@Override
public Label getDefault(Rule rule, BuildConfiguration configuration) {
if (!configuration.getFragment(ObjcConfiguration.class).generateDebugSymbols()) {
return null;
}
return configuration.getFragment(ObjcConfiguration.class).getDumpSymsLabel();
}
}))
.value(env.getLabel(Constants.TOOLS_REPOSITORY + "//tools/objc:dump_syms")))
.add(attr("$j2objc_dead_code_pruner", LABEL)
.allowedFileTypes(FileType.of(".py"))
.cfg(HOST)
Expand Down
5 changes: 5 additions & 0 deletions tools/objc/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ filegroup(
srcs = [":memleaks_plugin_stub"],
)

filegroup(
name = "dump_syms",
srcs = [":dump_syms_stub"],
)

sh_binary(
name = "ibtoolwrapper",
srcs = [":ibtoolwrapper.sh"],
Expand Down
7 changes: 7 additions & 0 deletions tools/objc/dump_syms_stub
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

(
printf 'Bazel does not yet support symbol dumping.\n'
) >&2

exit 1

0 comments on commit 25b38ac

Please sign in to comment.