Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(289)

Issue 1530183005: Special-case paths that appear in libs by not prefixing them with -l. (Closed)

Created:
5 years ago by agrieve
Modified:
5 years ago
Reviewers:
tfarina, brettw
CC:
chromium-reviews, tfarina
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Allow GN libs to be specified by path instead of by name Android needs to link against libgcc.a, and it makes much more sense to do so via direct path rather than using name + search-path to do so. This change allows paths (any string that contains a '/') to appear in a libs list. Paths are not prefixed by -l when passed to the linker, and follow the normal path semantics. BUG=570406 R=brettw@chromium.org, tfarina@chromium.org Committed: https://crrev.com/f865ab8f007295f7efc655a3685b7c4cab140635 Cr-Commit-Position: refs/heads/master@{#366530}

Patch Set 1 #

Total comments: 12

Patch Set 2 : review 1 #

Patch Set 3 : treat source_file libs as inputs #

Total comments: 14

Patch Set 4 : add test and review nits #

Patch Set 5 : implicit deps #

Total comments: 4

Patch Set 6 : fix multi-line if braces #

Patch Set 7 : Add lib_file.cc to gn.gyp #

Patch Set 8 : Fix typo in previous patch #

Unified diffs Side-by-side diffs Delta from patch set Stats (+233 lines, -33 lines) Patch
M tools/gn/BUILD.gn View 1 chunk +2 lines, -0 lines 0 comments Download
M tools/gn/command_desc.cc View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M tools/gn/config_values.h View 3 chunks +5 lines, -2 lines 0 comments Download
M tools/gn/config_values_generator.cc View 1 2 3 4 5 2 chunks +8 lines, -4 lines 0 comments Download
M tools/gn/gn.gyp View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
A tools/gn/lib_file.h View 1 1 chunk +56 lines, -0 lines 0 comments Download
A tools/gn/lib_file.cc View 1 1 chunk +30 lines, -0 lines 0 comments Download
M tools/gn/ninja_binary_target_writer.cc View 1 2 3 4 5 2 chunks +20 lines, -6 lines 0 comments Download
M tools/gn/ninja_binary_target_writer_unittest.cc View 1 2 3 4 1 chunk +37 lines, -0 lines 0 comments Download
M tools/gn/target.h View 3 chunks +3 lines, -2 lines 0 comments Download
M tools/gn/target.cc View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M tools/gn/target_unittest.cc View 3 chunks +3 lines, -3 lines 0 comments Download
M tools/gn/test_with_scope.cc View 1 2 3 4 4 chunks +8 lines, -0 lines 0 comments Download
M tools/gn/value_extractors.h View 2 chunks +9 lines, -0 lines 0 comments Download
M tools/gn/value_extractors.cc View 2 chunks +30 lines, -0 lines 0 comments Download
M tools/gn/variables.cc View 1 2 3 1 chunk +14 lines, -14 lines 0 comments Download

Messages

Total messages: 30 (15 generated)
agrieve
It wasn't obvious to me which unit tests could be changed to cover the new ...
5 years ago (2015-12-17 18:44:30 UTC) #2
tfarina
Could you expand the CL description? Which are the paths you are whitelisting? Could you ...
5 years ago (2015-12-17 18:48:31 UTC) #4
tfarina
https://codereview.chromium.org/1530183005/diff/1/tools/gn/lib_file.cc File tools/gn/lib_file.cc (right): https://codereview.chromium.org/1530183005/diff/1/tools/gn/lib_file.cc#newcode1 tools/gn/lib_file.cc:1: // Copyright (c) 2015 The Chromium Authors. All rights ...
5 years ago (2015-12-17 18:52:45 UTC) #5
agrieve
Thanks! Updated cl description (agree - it was awful :P) https://codereview.chromium.org/1530183005/diff/1/tools/gn/lib_file.cc File tools/gn/lib_file.cc (right): https://codereview.chromium.org/1530183005/diff/1/tools/gn/lib_file.cc#newcode1 ...
5 years ago (2015-12-17 19:33:34 UTC) #9
brettw
The main suggestion here is for a binary target writer test. https://codereview.chromium.org/1530183005/diff/40001/tools/gn/command_desc.cc File tools/gn/command_desc.cc (right): ...
5 years ago (2015-12-18 00:04:55 UTC) #10
agrieve
https://codereview.chromium.org/1530183005/diff/40001/tools/gn/command_desc.cc File tools/gn/command_desc.cc (right): https://codereview.chromium.org/1530183005/diff/40001/tools/gn/command_desc.cc#newcode179 tools/gn/command_desc.cc:179: for (size_t i = 0; i < libs.size(); i++) ...
5 years ago (2015-12-18 15:39:08 UTC) #11
brettw
lgtm https://codereview.chromium.org/1530183005/diff/80001/tools/gn/config_values_generator.cc File tools/gn/config_values_generator.cc (right): https://codereview.chromium.org/1530183005/diff/80001/tools/gn/config_values_generator.cc#newcode86 tools/gn/config_values_generator.cc:86: if (libs_value) Since this is multi-line, always use ...
5 years ago (2015-12-21 22:39:29 UTC) #12
agrieve
https://codereview.chromium.org/1530183005/diff/80001/tools/gn/config_values_generator.cc File tools/gn/config_values_generator.cc (right): https://codereview.chromium.org/1530183005/diff/80001/tools/gn/config_values_generator.cc#newcode86 tools/gn/config_values_generator.cc:86: if (libs_value) On 2015/12/21 22:39:28, brettw wrote: > Since ...
5 years ago (2015-12-22 01:17:05 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1530183005/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1530183005/100001
5 years ago (2015-12-22 01:18:08 UTC) #16
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/158413)
5 years ago (2015-12-22 01:26:23 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1530183005/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1530183005/120001
5 years ago (2015-12-22 02:10:14 UTC) #21
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_compile_dbg_32_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_compile_dbg_32_ng/builds/138809)
5 years ago (2015-12-22 02:17:56 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1530183005/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1530183005/140001
5 years ago (2015-12-22 02:23:49 UTC) #26
commit-bot: I haz the power
Committed patchset #8 (id:140001)
5 years ago (2015-12-22 03:04:09 UTC) #28
commit-bot: I haz the power
5 years ago (2015-12-22 03:04:53 UTC) #30
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/f865ab8f007295f7efc655a3685b7c4cab140635
Cr-Commit-Position: refs/heads/master@{#366530}

Powered by Google App Engine
This is Rietveld 408576698