Closed
Bug 1000726
Opened 8 years ago
Closed 8 years ago
Add support for -Zi -Fd in sccache
Categories
(Firefox Build System :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla32
People
(Reporter: glandium, Assigned: glandium)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
6.65 KB,
patch
|
mshal
:
review+
|
Details | Diff | Splinter Review |
Currently, sccache relies on -Z7 on windows, which puts debug info in the object file, while we normally use -Zi in firefox build.
Assignee | ||
Comment 1•8 years ago
|
||
Assignee: nobody → mh+mozilla
Attachment #8411595 -
Flags: review?(mshal)
Comment 2•8 years ago
|
||
Comment on attachment 8411595 [details] [diff] [review] Add support for -Zi -Fd with MSVC >+ # -Fd is not taken into account unless -Zi is given >+ if debug_info: >+ # -Zi without -Fd defaults to vcxxx.pdb (where xxx depends on the >+ # MSVC version), and that's used for all compilations with the same >+ # working directory. We can't cache such a pdb. >+ if not pdb: >+ raise CannotCacheError() >+ output['pdb'] = pdb Why can't we cache the default vcxxx.pdb, but -Fdgenerated.pdb (from config/rules.mk) is ok? Isn't that also used for all compilations in the same directory? >+ may_cache = True >+ if 'pdb' in parsed_args['output']: >+ pdb = parsed_args['output']['pdb'] >+ pdb = os.path.join(cwd, pdb) if cwd else pdb >+ # If the pdb exists, we don't know if it's shared with another >+ # compilation, and if it is, we can't cache. Sadly, this is racy. >+ if os.path.exists(pdb): >+ may_cache = False I'm a bit confused between this and the above code. If we let -Fdgenerated.pdb through, does that mean that the first .cpp file in a directory that gets compiled will pull generated.pdb from the cache? And then all other files in the directory will see that generated.pdb already exists, and force a recompile since may_cache=False?
Assignee | ||
Comment 3•8 years ago
|
||
(In reply to Michael Shal [:mshal] from comment #2) > I'm a bit confused between this and the above code. If we let > -Fdgenerated.pdb through, does that mean that the first .cpp file in a > directory that gets compiled will pull generated.pdb from the cache? And > then all other files in the directory will see that generated.pdb already > exists, and force a recompile since may_cache=False? yes.
Updated•8 years ago
|
Attachment #8411595 -
Flags: review?(mshal) → review+
Assignee | ||
Comment 4•8 years ago
|
||
https://github.com/glandium/sccache/commit/6bc792b21bd409cdd05da2d8848b58aea4bf1d2f
Assignee | ||
Updated•8 years ago
|
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Updated•8 years ago
|
Target Milestone: --- → mozilla32
Updated•4 years ago
|
Product: Core → Firefox Build System
You need to log in
before you can comment on or make changes to this bug.
Description
•