Closed Bug 1000726 Opened 9 years ago Closed 9 years ago
Add support for -Zi -Fd in sccache
Currently, sccache relies on -Z7 on windows, which puts debug info in the object file, while we normally use -Zi in firefox build.
Assignee: nobody → mh+mozilla
Attachment #8411595 - Flags: review?(mshal)
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?
(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.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.