Skip to content

Commit

Permalink
Increase memory limit for CppLink, for '-c dbg' builds.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 695474465
Change-Id: Ifd3445cdb2cd41bd08f7f1f7364fe0714a02bdcd
  • Loading branch information
Googler authored and copybara-github committed Nov 11, 2024
1 parent 22e7f6a commit 565a142
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,10 @@ def _create_action(
# TODO(b/338618120): ^ remove cheat, needs depot cleanup, always use a toolchain
toolchain = semantics.toolchain

execution_info = semantics.get_cc_link_memlimit(
cc_toolchain._cpp_configuration.compilation_mode(),
execution_info,
)
actions.run(
mnemonic = mnemonic,
executable = tool_path,
Expand Down
4 changes: 4 additions & 0 deletions src/main/starlark/builtins_bzl/common/cc/semantics.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@ def _get_linkstatic_default_for_test():
"//conditions:default": False,
})

def _get_cc_link_memlimit(compilation_mode, exec_info):
return exec_info

def _get_nocopts_attr():
return {}

Expand Down Expand Up @@ -173,6 +176,7 @@ semantics = struct(
get_implementation_deps_allowed_attr = _get_implementation_deps_allowed_attr,
check_can_use_implementation_deps = _check_can_use_implementation_deps,
get_linkstatic_default_for_test = _get_linkstatic_default_for_test,
get_cc_link_memlimit = _get_cc_link_memlimit,
get_runtimes_toolchain = _get_runtimes_toolchain,
get_test_malloc_attr = _get_test_malloc_attr,
get_cc_runtimes = _get_cc_runtimes,
Expand Down

0 comments on commit 565a142

Please sign in to comment.