Skip to content

Commit

Permalink
C++: Flip incompatible_require_linker_input_cc_api
Browse files Browse the repository at this point in the history
See #10860

This might break downstream projects.

Flipping so that the change makes it to Bazel 4.0.

RELNOTES:C++ Starlark API requires linker_inputs wrapping library_to_link. #10860
PiperOrigin-RevId: 341043335
  • Loading branch information
oquenchil authored and Copybara-Service committed Nov 6, 2020
1 parent 1049fe8 commit 9a2893d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ public class BuildLanguageOptions extends OptionsBase implements Serializable {

@Option(
name = "incompatible_require_linker_input_cc_api",
defaultValue = "false",
defaultValue = "true",
documentationCategory = OptionDocumentationCategory.STARLARK_SEMANTICS,
effectTags = {OptionEffectTag.BUILD_FILE_SEMANTICS, OptionEffectTag.LOADING_AND_ANALYSIS},
metadataTags = {
Expand Down Expand Up @@ -716,7 +716,7 @@ public StarlarkSemantics toStarlarkSemantics() {
public static final String INCOMPATIBLE_OBJC_PROVIDER_REMOVE_COMPILE_INFO =
"+incompatible_objc_provider_remove_compile_info";
public static final String INCOMPATIBLE_REQUIRE_LINKER_INPUT_CC_API =
"-incompatible_require_linker_input_cc_api";
"+incompatible_require_linker_input_cc_api";
public static final String INCOMPATIBLE_RESTRICT_STRING_ESCAPES =
"-incompatible_restrict_string_escapes";
public static final String INCOMPATIBLE_RUN_SHELL_COMMAND_STRING =
Expand Down
8 changes: 6 additions & 2 deletions src/main/res/win_res.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,13 @@ def _windows_resources_impl(ctx):
for rc_file in ctx.files.rc_files
]
link_flags = [res.path for res in compiled_resources]
linker_input = cc_common.create_linker_input(
owner = ctx.label,
additional_inputs = depset(compiled_resources),
user_link_flags = depset(link_flags),
)
linking_context = cc_common.create_linking_context(
additional_inputs = compiled_resources,
user_link_flags = link_flags,
linker_inputs = depset([linker_input]),
)
return [
DefaultInfo(files = depset(compiled_resources)),
Expand Down

0 comments on commit 9a2893d

Please sign in to comment.