Commit df8a0343 authored by Samuel Huang's avatar Samuel Huang Committed by Commit Bot

[Build] Fix OS check for generate_linker_map.

The build flag |generate_linker_map| is useful for SuperSize. There is
an assert in toolchain.gni to limit it to {android, linux}, but it's
unclear whether this should be for current_os or target_os. Attempts to
change this led to some past churn, e.g.:

  https://chromium-review.googlesource.com/c/chromium/src/+/1038430
  https://chromium-review.googlesource.com/c/chromium/src/+/1715024

This CL relaxes the check to allow all combos of
  {current_os, target_os} * {android, linux},
in hope to put the problem to rest.

Fixed: 986842
Change-Id: Id44bd76a900f0f55e10efc8bc25d75ac52e92f44
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2089787
Commit-Queue: Samuel Huang <huangs@chromium.org>
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: default avatarAndrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#747848}
parent 3347a460
......@@ -30,7 +30,8 @@ if (generate_linker_map) {
assert(
is_official_build,
"Linker map files should only be generated when is_official_build = true")
assert(current_os == "android" || target_os == "linux",
assert(current_os == "android" || current_os == "linux" ||
target_os == "android" || target_os == "linux",
"Linker map files should only be generated for Android and Linux")
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment