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

Issue 1292983004: [GN]: Precompiled header support for GCC. (Closed)

Created:
5 years, 4 months ago by Bons
Modified:
5 years, 3 months ago
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

[GN]: Precompiled header support for GCC. + Adds `gcc` as an option for `precompiled_header_type` + Fixes a bug where build targets had superfluous pch deps. + GCH files are compiled using the `-x <header lang>` and used via the `-header` flag. Since the two are mutually exclusive and we didn’t want to add `-header` to every build target line, the global cflags_* vars contain `-include` and each pch build target includes its own copy of the cflags_* values while replacing `-include` with `-x <header lang>` BUG=297681 Committed: https://crrev.com/1ae777a027b5243924f2b3ba774067a7bf5926cf Cr-Commit-Position: refs/heads/master@{#349518}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : switch statement. error handling. some initial docs. #

Total comments: 2

Patch Set 4 : use .gch suffix #

Patch Set 5 : cflags_pch_* #

Patch Set 6 : merge #

Patch Set 7 : #

Patch Set 8 : #

Patch Set 9 : #

Patch Set 10 : fixed include #

Patch Set 11 : #

Patch Set 12 : #

Patch Set 13 : #

Patch Set 14 : #

Patch Set 15 : #

Patch Set 16 : #

Patch Set 17 : #

Patch Set 18 : fix bug with superfluous pch deps. #

Patch Set 19 : #

Patch Set 20 : #

Patch Set 21 : #

Patch Set 22 : #

Total comments: 6

Patch Set 23 : #

Total comments: 4

Patch Set 24 : fix use-after-free bug #

Total comments: 8

Patch Set 25 : Address Brett’s comments... (hopefully) #

Total comments: 6

Patch Set 26 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+520 lines, -99 lines) Patch
M build/config/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 2 chunks +9 lines, -5 lines 0 comments Download
M build/toolchain/mac/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 4 chunks +17 lines, -0 lines 0 comments Download
M tools/gn/config_values_generator.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -1 line 0 comments Download
M tools/gn/function_toolchain.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 3 chunks +10 lines, -5 lines 0 comments Download
M tools/gn/ninja_binary_target_writer.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 1 chunk +25 lines, -9 lines 0 comments Download
M tools/gn/ninja_binary_target_writer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 13 chunks +280 lines, -71 lines 0 comments Download
M tools/gn/ninja_binary_target_writer_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 6 chunks +159 lines, -6 lines 0 comments Download
M tools/gn/substitution_type.h View 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -1 line 0 comments Download
M tools/gn/tool.h View 1 chunk +2 lines, -1 line 0 comments Download
M tools/gn/variables.h View 1 2 3 4 5 6 7 8 1 chunk +16 lines, -0 lines 0 comments Download

Messages

Total messages: 34 (2 generated)
Bons
WIP: Progress for GCC precompiled header support. Most importantly, I’d like to know if this ...
5 years, 4 months ago (2015-08-20 17:20:52 UTC) #2
Mark Mentovai
Take care: a precompiled header is normally only valid when created with the same compiler ...
5 years, 4 months ago (2015-08-20 20:52:03 UTC) #3
brettw
Sorry, I'm OOO Friday but will try to look at this soonish. To answer Mark's ...
5 years, 4 months ago (2015-08-21 05:09:31 UTC) #4
Bons
On 2015/08/21 05:09:31, brettw wrote: > Sorry, I'm OOO Friday but will try to look ...
5 years, 4 months ago (2015-08-21 17:29:43 UTC) #5
brettw
https://codereview.chromium.org/1292983004/diff/40001/tools/gn/ninja_binary_target_writer.cc File tools/gn/ninja_binary_target_writer.cc (right): https://codereview.chromium.org/1292983004/diff/40001/tools/gn/ninja_binary_target_writer.cc#newcode195 tools/gn/ninja_binary_target_writer.cc:195: const char* lang_suffix = GetPCHSuffixForToolType(tool_type); I'm having a hard ...
5 years, 4 months ago (2015-08-24 19:36:05 UTC) #6
Bons
https://codereview.chromium.org/1292983004/diff/40001/tools/gn/ninja_binary_target_writer.cc File tools/gn/ninja_binary_target_writer.cc (right): https://codereview.chromium.org/1292983004/diff/40001/tools/gn/ninja_binary_target_writer.cc#newcode195 tools/gn/ninja_binary_target_writer.cc:195: const char* lang_suffix = GetPCHSuffixForToolType(tool_type); On 2015/08/24 19:36:05, brettw ...
5 years, 4 months ago (2015-08-24 19:53:57 UTC) #7
Nico
On 2015/08/21 17:29:43, Bons wrote: > On 2015/08/21 05:09:31, brettw wrote: > > Sorry, I'm ...
5 years, 4 months ago (2015-08-25 00:40:06 UTC) #8
Nico
I didn't look at the code in detail, but it seems to do roughly the ...
5 years, 4 months ago (2015-08-25 00:42:25 UTC) #9
Bons
On 2015/08/25 00:42:25, Nico wrote: > I didn't look at the code in detail, but ...
5 years, 4 months ago (2015-08-25 00:51:51 UTC) #10
Nico
On 2015/08/25 00:51:51, Bons wrote: > On 2015/08/25 00:42:25, Nico wrote: > > I didn't ...
5 years, 4 months ago (2015-08-25 04:48:38 UTC) #11
Bons
OK, please take another look. I changed it to better emulate gyps's behavior. Here is ...
5 years, 3 months ago (2015-08-27 15:41:16 UTC) #12
Bons
On 2015/08/27 15:41:16, Bons wrote: > OK, please take another look. I changed it to ...
5 years, 3 months ago (2015-08-27 15:43:53 UTC) #13
Bons
On 2015/08/27 15:43:53, Bons wrote: > On 2015/08/27 15:41:16, Bons wrote: > > OK, please ...
5 years, 3 months ago (2015-08-27 21:49:03 UTC) #14
brettw
Do we really need the separate set of flags for pch? The reason for having ...
5 years, 3 months ago (2015-08-28 20:09:30 UTC) #15
Bons
On 2015/08/28 20:09:30, brettw wrote: > Do we really need the separate set of flags ...
5 years, 3 months ago (2015-09-01 01:43:13 UTC) #16
Bons
On 2015/09/01 01:43:13, Bons wrote: > On 2015/08/28 20:09:30, brettw wrote: > > Do we ...
5 years, 3 months ago (2015-09-03 15:44:52 UTC) #17
Bons
On 2015/09/03 15:44:52, Bons wrote: > On 2015/09/01 01:43:13, Bons wrote: > > On 2015/08/28 ...
5 years, 3 months ago (2015-09-14 18:31:08 UTC) #18
brettw
https://codereview.chromium.org/1292983004/diff/410001/tools/gn/ninja_binary_target_writer.cc File tools/gn/ninja_binary_target_writer.cc (right): https://codereview.chromium.org/1292983004/diff/410001/tools/gn/ninja_binary_target_writer.cc#newcode194 tools/gn/ninja_binary_target_writer.cc:194: if (extension_offset == std::string::npos) { This new code will ...
5 years, 3 months ago (2015-09-14 23:56:28 UTC) #19
Bons
https://codereview.chromium.org/1292983004/diff/410001/tools/gn/ninja_binary_target_writer.cc File tools/gn/ninja_binary_target_writer.cc (right): https://codereview.chromium.org/1292983004/diff/410001/tools/gn/ninja_binary_target_writer.cc#newcode194 tools/gn/ninja_binary_target_writer.cc:194: if (extension_offset == std::string::npos) { On 2015/09/14 23:56:27, brettw ...
5 years, 3 months ago (2015-09-15 15:08:02 UTC) #20
brettw
https://codereview.chromium.org/1292983004/diff/430001/tools/gn/ninja_binary_target_writer.cc File tools/gn/ninja_binary_target_writer.cc (right): https://codereview.chromium.org/1292983004/diff/430001/tools/gn/ninja_binary_target_writer.cc#newcode176 tools/gn/ninja_binary_target_writer.cc:176: return result.c_str(); This will crash. Can you test this ...
5 years, 3 months ago (2015-09-15 17:17:12 UTC) #21
Bons
https://codereview.chromium.org/1292983004/diff/430001/tools/gn/ninja_binary_target_writer.cc File tools/gn/ninja_binary_target_writer.cc (right): https://codereview.chromium.org/1292983004/diff/430001/tools/gn/ninja_binary_target_writer.cc#newcode176 tools/gn/ninja_binary_target_writer.cc:176: return result.c_str(); On 2015/09/15 17:17:12, brettw wrote: > This ...
5 years, 3 months ago (2015-09-15 18:16:24 UTC) #22
Bons
https://codereview.chromium.org/1292983004/diff/430001/tools/gn/ninja_binary_target_writer.cc File tools/gn/ninja_binary_target_writer.cc (right): https://codereview.chromium.org/1292983004/diff/430001/tools/gn/ninja_binary_target_writer.cc#newcode176 tools/gn/ninja_binary_target_writer.cc:176: return result.c_str(); On 2015/09/15 18:16:24, Bons wrote: > On ...
5 years, 3 months ago (2015-09-15 20:11:40 UTC) #23
Bons
On 2015/09/15 20:11:40, Bons wrote: > https://codereview.chromium.org/1292983004/diff/430001/tools/gn/ninja_binary_target_writer.cc > File tools/gn/ninja_binary_target_writer.cc (right): > > https://codereview.chromium.org/1292983004/diff/430001/tools/gn/ninja_binary_target_writer.cc#newcode176 > ...
5 years, 3 months ago (2015-09-16 15:02:43 UTC) #24
Bons
On 2015/09/16 15:02:43, Bons wrote: > On 2015/09/15 20:11:40, Bons wrote: > > > https://codereview.chromium.org/1292983004/diff/430001/tools/gn/ninja_binary_target_writer.cc ...
5 years, 3 months ago (2015-09-16 22:19:23 UTC) #25
brettw
Sorry this review is taking forever! Thanks for putting up with it... https://codereview.chromium.org/1292983004/diff/430001/tools/gn/ninja_binary_target_writer.cc File tools/gn/ninja_binary_target_writer.cc ...
5 years, 3 months ago (2015-09-16 22:41:14 UTC) #26
Bons
OK. It’s been updated to keep some of the msvc and gcc bits separate in ...
5 years, 3 months ago (2015-09-17 16:53:40 UTC) #27
brettw
I think this is almost it... https://codereview.chromium.org/1292983004/diff/470001/tools/gn/ninja_binary_target_writer.cc File tools/gn/ninja_binary_target_writer.cc (right): https://codereview.chromium.org/1292983004/diff/470001/tools/gn/ninja_binary_target_writer.cc#newcode588 tools/gn/ninja_binary_target_writer.cc:588: header_str.insert(0, "//"); Is ...
5 years, 3 months ago (2015-09-17 19:47:25 UTC) #28
Bons
https://codereview.chromium.org/1292983004/diff/470001/tools/gn/ninja_binary_target_writer.cc File tools/gn/ninja_binary_target_writer.cc (right): https://codereview.chromium.org/1292983004/diff/470001/tools/gn/ninja_binary_target_writer.cc#newcode588 tools/gn/ninja_binary_target_writer.cc:588: header_str.insert(0, "//"); On 2015/09/17 19:47:25, brettw wrote: > Is ...
5 years, 3 months ago (2015-09-17 20:36:12 UTC) #29
brettw
lgtm
5 years, 3 months ago (2015-09-17 21:32:31 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1292983004/490001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1292983004/490001
5 years, 3 months ago (2015-09-17 21:45:29 UTC) #32
commit-bot: I haz the power
Committed patchset #26 (id:490001)
5 years, 3 months ago (2015-09-17 22:24:39 UTC) #33
commit-bot: I haz the power
5 years, 3 months ago (2015-09-17 22:25:22 UTC) #34
Message was sent while issue was closed.
Patchset 26 (id:??) landed as
https://crrev.com/1ae777a027b5243924f2b3ba774067a7bf5926cf
Cr-Commit-Position: refs/heads/master@{#349518}

Powered by Google App Engine
This is Rietveld 408576698