Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not generate exec link map files by default #33635

Merged
merged 8 commits into from
Jun 3, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Do not generate exec link map files by default
  • Loading branch information
arkq committed May 28, 2024
commit 38e34abb086afbb71683d3cd2f25d814feddc180
4 changes: 2 additions & 2 deletions build/toolchain/gcc_toolchain.gni
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ import("//build_overrides/pigweed.gni")
import("$dir_pw_toolchain/generate_toolchain.gni")

declare_args() {
# Generate Linker map files. Can skip since they can
# Generate Linker map files. By default it is disabled since they can
# be quite large.
#
# Note that toolchains can individually override this
chip_generate_link_map_file = true
chip_generate_link_map_file = false
}

template("gcc_toolchain") {
Expand Down
14 changes: 9 additions & 5 deletions scripts/build/build_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,17 @@ def ValidateTargetNames(context, parameter, values):
default=[],
multiple=True,
callback=ValidateTargetNames,
help='Build target(s)'
)
help='Build target(s)')
@click.option(
'--enable-link-map-file',
default=False,
is_flag=True,
help='Enable generation of link map files.')
@click.option(
'--enable-flashbundle',
default=False,
is_flag=True,
help='Also generate the flashbundles for the app.'
)
help='Also generate the flashbundles for the app.')
@click.option(
'--repo',
default='.',
Expand Down Expand Up @@ -132,7 +135,7 @@ def ValidateTargetNames(context, parameter, values):
'Set pigweed command launcher. E.g.: "--pw-command-launcher=ccache" '
'for using ccache when building examples.'))
@click.pass_context
def main(context, log_level, target, repo,
def main(context, log_level, target, enable_link_map_file, repo,
out_prefix, pregen_dir, clean, dry_run, dry_run_output, enable_flashbundle,
no_log_timestamps, pw_command_launcher):
# Ensures somewhat pretty logging of what is going on
Expand Down Expand Up @@ -160,6 +163,7 @@ def main(context, log_level, target, repo,
context.obj = build.Context(
repository_path=repo, output_prefix=out_prefix, runner=runner)
context.obj.SetupBuilders(targets=requested_targets, options=BuilderOptions(
enable_link_map_file=enable_link_map_file,
enable_flashbundle=enable_flashbundle,
pw_command_launcher=pw_command_launcher,
pregen_dir=pregen_dir,
Expand Down
3 changes: 3 additions & 0 deletions scripts/build/builders/android.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,9 @@ def generate(self):
if self.options.pw_command_launcher:
gn_args["pw_command_launcher"] = self.options.pw_command_launcher

if self.options.enable_link_map_file:
gn_args["chip_generate_link_map_file"] = True

if exampleName == "chip-test":
gn_args["chip_build_tests"] = True
if self.profile != AndroidProfile.DEBUG:
Expand Down
3 changes: 3 additions & 0 deletions scripts/build/builders/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@

@dataclass
class BuilderOptions:
# Generate a link map file
enable_link_map_file: bool = True

# Enable flashbundle generation stage
enable_flashbundle: bool = False

Expand Down
3 changes: 3 additions & 0 deletions scripts/build/builders/efr32.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,9 @@ def generate(self):
if self.options.pw_command_launcher:
extra_args.append('pw_command_launcher="%s"' % self.options.pw_command_launcher)

if self.options.enable_link_map_file:
extra_args.append('chip_generate_link_map_file=true')

if self.options.pregen_dir:
extra_args.append('chip_code_pre_generated_directory="%s"' % self.options.pregen_dir)

Expand Down
3 changes: 3 additions & 0 deletions scripts/build/builders/gn.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ def generate(self):
if self.options.pw_command_launcher:
extra_args.append('pw_command_launcher="%s"' % self.options.pw_command_launcher)

if self.options.enable_link_map_file:
extra_args.append('chip_generate_link_map_file=true')

if self.options.pregen_dir:
extra_args.append('chip_code_pre_generated_directory="%s"' % self.options.pregen_dir)

Expand Down
1 change: 0 additions & 1 deletion src/test_driver/tizen/chip_tests/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ tizen_qemu_mkisofs("chip-tests-runner") {
# rebuild of the ISO image, so the test will be run with old
# binaries.
assets_non_tracked = [ rebase_path("${root_build_dir}/tests") ]
assets_non_tracked_exclude_globs = [ "*.map" ]
}

tizen_qemu_run("chip-tests") {
Expand Down