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

Issue 1386783003: [GN]: Support for loadable modules (Closed)

Created:
5 years, 2 months ago by Bons
Modified:
4 years ago
CC:
chromium-reviews, asanka, benjhayden+dwatch_chromium.org, tfarina
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[GN]: support for loadable modules + Adds a new target type loadable_module and tool type solink_module. loadable_module will trigger the solink_module tool type in the toolchain. + Updates reference.md and editor configs. BUG=369774 Committed: https://crrev.com/027840da082368b8d51f06b9c310807540e50eea Cr-Commit-Position: refs/heads/master@{#354077}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : add loadable_module #

Patch Set 4 : mark comments #

Total comments: 1

Patch Set 5 : #

Patch Set 6 : #

Patch Set 7 : #

Patch Set 8 : unit tests #

Total comments: 11

Patch Set 9 : remove darwin_bundle #

Patch Set 10 : #

Total comments: 4

Patch Set 11 : #

Patch Set 12 : #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+308 lines, -77 lines) Patch
M build/toolchain/mac/BUILD.gn View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -3 lines 0 comments Download
M tools/gn/BUILD.gn View 1 2 3 4 5 6 7 1 chunk +0 lines, -1 line 0 comments Download
M tools/gn/commands.h View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M tools/gn/commands.cc View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M tools/gn/docs/faq.md View 1 2 3 4 1 chunk +1 line, -4 lines 0 comments Download
M tools/gn/docs/language.md View 1 2 3 4 5 6 7 8 9 3 chunks +5 lines, -4 lines 0 comments Download
M tools/gn/docs/reference.md View 1 2 3 4 5 6 7 8 9 10 21 chunks +109 lines, -29 lines 0 comments Download
M tools/gn/function_toolchain.cc View 1 2 3 4 4 chunks +8 lines, -5 lines 3 comments Download
M tools/gn/functions.h View 1 2 3 4 1 chunk +9 lines, -0 lines 0 comments Download
M tools/gn/functions.cc View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M tools/gn/functions_target.cc View 1 2 3 4 5 6 7 8 9 3 chunks +35 lines, -3 lines 0 comments Download
M tools/gn/gn.gyp View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -1 line 0 comments Download
M tools/gn/misc/emacs/gn-mode.el View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M tools/gn/misc/tm/GN.tmLanguage View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M tools/gn/misc/vim/syntax/gn.vim View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M tools/gn/ninja_binary_target_writer.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M tools/gn/ninja_binary_target_writer_unittest.cc View 1 2 3 4 5 6 7 1 chunk +66 lines, -0 lines 0 comments Download
M tools/gn/ninja_target_writer.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -1 line 0 comments Download
M tools/gn/ninja_toolchain_writer.cc View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -1 line 0 comments Download
M tools/gn/runtime_deps.cc View 1 2 3 4 5 6 2 chunks +5 lines, -3 lines 0 comments Download
M tools/gn/runtime_deps_unittest.cc View 1 2 3 4 5 6 7 5 chunks +20 lines, -6 lines 0 comments Download
M tools/gn/target.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M tools/gn/target.cc View 1 2 3 4 5 6 7 8 3 chunks +8 lines, -3 lines 0 comments Download
M tools/gn/target_generator.cc View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
D tools/gn/target_generator_unittest.cc View 1 2 3 4 5 6 7 1 chunk +0 lines, -8 lines 0 comments Download
M tools/gn/test_with_scope.cc View 1 2 3 4 5 6 7 1 chunk +10 lines, -0 lines 0 comments Download
M tools/gn/toolchain.h View 1 2 3 4 2 chunks +2 lines, -0 lines 0 comments Download
M tools/gn/toolchain.cc View 1 2 3 4 4 chunks +5 lines, -0 lines 0 comments Download

Messages

Total messages: 30 (8 generated)
Bons
5 years, 2 months ago (2015-10-04 23:51:29 UTC) #2
Bons
After speaking with Mark, using darwin_bundle for both a loadable module and as an indicator ...
5 years, 2 months ago (2015-10-05 19:15:40 UTC) #3
Bons
Including gn-dev for any input.
5 years, 2 months ago (2015-10-05 21:36:21 UTC) #4
Bons
https://codereview.chromium.org/1386783003/diff/60001/build/toolchain/mac/BUILD.gn File build/toolchain/mac/BUILD.gn (right): https://codereview.chromium.org/1386783003/diff/60001/build/toolchain/mac/BUILD.gn#newcode171 build/toolchain/mac/BUILD.gn:171: # tool("solink") { This will be called solink with ...
5 years, 2 months ago (2015-10-06 20:29:19 UTC) #5
brettw
I haven't forgotten about this. My other project is taking all of my time right ...
5 years, 2 months ago (2015-10-08 04:34:24 UTC) #6
Bons
OK. Unit tests have been added. Please take another look. Example output can be seen ...
5 years, 2 months ago (2015-10-11 19:57:59 UTC) #8
Bons
On 2015/10/11 19:57:59, Bons wrote: > OK. Unit tests have been added. Please take another ...
5 years, 2 months ago (2015-10-11 20:16:27 UTC) #9
brettw
I don't understand the addition of the darwin bundle flag. If we're not using it ...
5 years, 2 months ago (2015-10-13 22:59:07 UTC) #10
Bons
Removed darwin_bundle. https://codereview.chromium.org/1386783003/diff/140001/tools/gn/binary_target_generator.cc File tools/gn/binary_target_generator.cc (right): https://codereview.chromium.org/1386783003/diff/140001/tools/gn/binary_target_generator.cc#newcode141 tools/gn/binary_target_generator.cc:141: if (target_->output_type() == Target::STATIC_LIBRARY) On 2015/10/13 22:59:07, ...
5 years, 2 months ago (2015-10-13 23:12:47 UTC) #11
brettw
https://codereview.chromium.org/1386783003/diff/140001/tools/gn/docs/language.md File tools/gn/docs/language.md (right): https://codereview.chromium.org/1386783003/diff/140001/tools/gn/docs/language.md#newcode379 tools/gn/docs/language.md:379: * `loadable_module`: An .so loadable only at runtime. Can ...
5 years, 2 months ago (2015-10-13 23:13:33 UTC) #12
Bons
https://codereview.chromium.org/1386783003/diff/140001/tools/gn/docs/language.md File tools/gn/docs/language.md (right): https://codereview.chromium.org/1386783003/diff/140001/tools/gn/docs/language.md#newcode379 tools/gn/docs/language.md:379: * `loadable_module`: An .so loadable only at runtime. On ...
5 years, 2 months ago (2015-10-13 23:30:52 UTC) #13
brettw
This looks very nice. LGTM https://codereview.chromium.org/1386783003/diff/180001/tools/gn/docs/reference.md File tools/gn/docs/reference.md (right): https://codereview.chromium.org/1386783003/diff/180001/tools/gn/docs/reference.md#newcode381 tools/gn/docs/reference.md:381: forward_dependent_configs_from I think this ...
5 years, 2 months ago (2015-10-14 17:45:57 UTC) #14
Bons
https://codereview.chromium.org/1386783003/diff/180001/tools/gn/docs/reference.md File tools/gn/docs/reference.md (right): https://codereview.chromium.org/1386783003/diff/180001/tools/gn/docs/reference.md#newcode381 tools/gn/docs/reference.md:381: forward_dependent_configs_from On 2015/10/14 17:45:56, brettw wrote: > I think ...
5 years, 2 months ago (2015-10-14 18:03:42 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1386783003/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1386783003/200001
5 years, 2 months ago (2015-10-14 18:05:10 UTC) #18
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_ozone_rel_ng/builds/75086) linux_chromium_chromeos_rel_ng on tryserver.chromium.linux (JOB_FAILED, ...
5 years, 2 months ago (2015-10-14 18:12:33 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1386783003/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1386783003/220001
5 years, 2 months ago (2015-10-14 18:18:35 UTC) #23
commit-bot: I haz the power
Committed patchset #12 (id:220001)
5 years, 2 months ago (2015-10-14 18:49:52 UTC) #24
commit-bot: I haz the power
Patchset 12 (id:??) landed as https://crrev.com/027840da082368b8d51f06b9c310807540e50eea Cr-Commit-Position: refs/heads/master@{#354077}
5 years, 2 months ago (2015-10-14 18:50:34 UTC) #25
Nico
https://codereview.chromium.org/1386783003/diff/220001/tools/gn/function_toolchain.cc File tools/gn/function_toolchain.cc (right): https://codereview.chromium.org/1386783003/diff/220001/tools/gn/function_toolchain.cc#newcode402 tools/gn/function_toolchain.cc:402: " \"solink\": Linker for shared libraries\n" this didn't add ...
4 years, 10 months ago (2016-02-11 00:32:52 UTC) #27
Bons
https://codereview.chromium.org/1386783003/diff/220001/tools/gn/function_toolchain.cc File tools/gn/function_toolchain.cc (right): https://codereview.chromium.org/1386783003/diff/220001/tools/gn/function_toolchain.cc#newcode402 tools/gn/function_toolchain.cc:402: " \"solink\": Linker for shared libraries\n" On 2016/02/11 00:32:52, ...
4 years, 10 months ago (2016-02-12 16:09:22 UTC) #28
Nico
https://codereview.chromium.org/1386783003/diff/220001/tools/gn/function_toolchain.cc File tools/gn/function_toolchain.cc (right): https://codereview.chromium.org/1386783003/diff/220001/tools/gn/function_toolchain.cc#newcode402 tools/gn/function_toolchain.cc:402: " \"solink\": Linker for shared libraries\n" On 2016/02/12 16:09:22, ...
4 years, 10 months ago (2016-02-12 16:20:01 UTC) #29
Bons
4 years, 10 months ago (2016-02-12 16:21:17 UTC) #30
Message was sent while issue was closed.
On 2016/02/12 16:20:01, Nico wrote:
>
https://codereview.chromium.org/1386783003/diff/220001/tools/gn/function_tool...
> File tools/gn/function_toolchain.cc (right):
> 
>
https://codereview.chromium.org/1386783003/diff/220001/tools/gn/function_tool...
> tools/gn/function_toolchain.cc:402: "      \"solink\": Linker for shared
> libraries\n"
> On 2016/02/12 16:09:22, Bons wrote:
> > On 2016/02/11 00:32:52, Nico wrote:
> > > this didn't add solink_module to the documentation. can you fix that?
> > 
> > since you’re in the this code already why not add it?
> 
> I don't know what to write :-) I looked at the docs to find out what this does
> and then noticed that it doesn't say. I gather it's similar to the same thing
in
> gyp; but when I last talked with brettw about this over a year ago, I think
the
> plan was to make loadable_module a bit on shared_library. Since things turned
> out differently, I'm not sure what to write, so I need some help at least. Can
> you give me a short summary of what to write?
> 
> I guess solink_module is used for loadable_module() targets and is generally
> very similar to solink. Is solink_module() ever used on non-mac? Does
> link_output vs depend_output make sense for it? (Neither's set on Windows for
> solink_module in Chromium's case.)

Ah got it. I’ll take a look and send something over once I clear those cobwebs
out later today.

Powered by Google App Engine
This is Rietveld 408576698