Skip to content

Commit

Permalink
Flip --incompatible_disable_legacy_cpp_toolchain_skylark_api incompat…
Browse files Browse the repository at this point in the history
…ible flag.

#6380

RELNOTES: Incompatible flag --incompatible_disable_legacy_cpp_toolchain_skylark_api was flipped.
PiperOrigin-RevId: 217169905
  • Loading branch information
hlopko authored and Copybara-Service committed Oct 15, 2018
1 parent fcf28b1 commit 8d1a324
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 42 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -738,7 +738,7 @@ public Label getFdoPrefetchHintsLabel() {

@Option(
name = "incompatible_disable_legacy_cpp_toolchain_skylark_api",
defaultValue = "false",
defaultValue = "true",
documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
effectTags = {OptionEffectTag.LOADING_AND_ANALYSIS},
metadataTags = {
Expand Down Expand Up @@ -920,6 +920,8 @@ public FragmentOptions getHost() {
host.fdoProfileLabel = null;
host.inmemoryDotdFiles = inmemoryDotdFiles;

host.disableLegacyToolchainSkylarkApi = disableLegacyToolchainSkylarkApi;

return host;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,26 +122,6 @@ public void testDisablingLinkOptions() throws Exception {
testDisablingLinkingApiMethod("provider.link_options_do_not_use");
}

@Test
public void testDisablingMostlyStaticLinkOptionsFromConfiguration() throws Exception {
testDisablingLinkingApiMethod("ctx.fragments.cpp.mostly_static_link_options([], False)");
}

@Test
public void testDisablingFullyStaticLinkOptionsFromConfiguration() throws Exception {
testDisablingLinkingApiMethod("ctx.fragments.cpp.fully_static_link_options([], True)");
}

@Test
public void testDisablingDynamicLinkOptionsFromConfiguration() throws Exception {
testDisablingLinkingApiMethod("ctx.fragments.cpp.dynamic_link_options([], False)");
}

@Test
public void testDisablingLinkOptionsFromConfiguration() throws Exception {
testDisablingLinkingApiMethod("ctx.fragments.cpp.link_options");
}

private void testDisablingLinkingApiMethod(String method) throws Exception {
useConfiguration("--experimental_disable_legacy_cc_linking_api");
testDisablingLinkingApiMethodWithConfiguration(method);
Expand Down Expand Up @@ -193,27 +173,6 @@ public void testDisablingCOptions() throws Exception {
public void testDisablingUnfilteredOptions() throws Exception {
testDisablingCompilationApiMethod("provider.unfiltered_compiler_options([])");
}

@Test
public void testDisablingCompilerOptionsFromConfiguration() throws Exception {
testDisablingCompilationApiMethod("ctx.fragments.cpp.compiler_options([])");
}

@Test
public void testDisablingCxxOptionsFromConfiguration() throws Exception {
testDisablingCompilationApiMethod("ctx.fragments.cpp.cxx_options([])");
}

@Test
public void testDisablingCOptionsFromConfiguration() throws Exception {
testDisablingCompilationApiMethod("ctx.fragments.cpp.c_options");
}

@Test
public void testDisablingUnfilteredOptionsFromConfiguration() throws Exception {
testDisablingCompilationApiMethod("ctx.fragments.cpp.unfiltered_compiler_options([])");
}

private void testDisablingCompilationApiMethod(String method) throws Exception {
useConfiguration("--experimental_disable_legacy_cc_compilation_api");
testDisablingCompilationApiMethodWithConfiguration(method);
Expand Down

0 comments on commit 8d1a324

Please sign in to comment.