Skip to content

Commit

Permalink
Automated rollback of commit 8d1a324.
Browse files Browse the repository at this point in the history
*** Reason for rollback ***

Broke buildkite: https://buildkite.com/bazel/bazel-with-downstream-projects-bazel/builds/503

*** Original change description ***

Flip --incompatible_disable_legacy_cpp_toolchain_skylark_api incompatible flag.

#6380

RELNOTES: Incompatible flag --incompatible_disable_legacy_cpp_toolchain_skylark_api was flipped.
PiperOrigin-RevId: 217275296
  • Loading branch information
hlopko authored and Copybara-Service committed Oct 16, 2018
1 parent b7a3f42 commit a6deb76
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 3 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 = "true",
defaultValue = "false",
documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
effectTags = {OptionEffectTag.LOADING_AND_ANALYSIS},
metadataTags = {
Expand Down Expand Up @@ -920,8 +920,6 @@ 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,6 +122,26 @@ 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 @@ -173,6 +193,27 @@ 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 a6deb76

Please sign in to comment.