diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2016-11-09 15:00:46 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-09 15:00:46 -0500 |
commit | dc10945ad7cd210426091a9e7809c90a9ff0b175 (patch) | |
tree | ae9c7139555c1dda1a41946496ae13ab6303adba /mesonbuild/compilers.py | |
parent | 5603f90287695fc6e092f2701ec222e4fddc3899 (diff) | |
parent | daa893e0119f972eae1b55db6e5f4a61799fdd93 (diff) | |
download | meson-dc10945ad7cd210426091a9e7809c90a9ff0b175.zip meson-dc10945ad7cd210426091a9e7809c90a9ff0b175.tar.gz meson-dc10945ad7cd210426091a9e7809c90a9ff0b175.tar.bz2 |
Merge pull request #995 from centricular/more-appveyor-builds
appveyor.yml: Test more than just MSVC2010 + Ninja on x86
Diffstat (limited to 'mesonbuild/compilers.py')
-rw-r--r-- | mesonbuild/compilers.py | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/mesonbuild/compilers.py b/mesonbuild/compilers.py index 2feae88..bbe6a72 100644 --- a/mesonbuild/compilers.py +++ b/mesonbuild/compilers.py @@ -435,7 +435,7 @@ class Compiler(): # Some compilers (msvc) write debug info to a separate file. # These args specify where it should be written. - def get_compile_debugfile_args(self, rel_obj): + def get_compile_debugfile_args(self, rel_obj, **kwargs): return [] def get_link_debugfile_args(self, rel_obj): @@ -1883,10 +1883,19 @@ class VisualStudioCCompiler(CCompiler): raise MesonException('Compiling test app failed.') return not(warning_text in stde or warning_text in stdo) - def get_compile_debugfile_args(self, rel_obj): + def get_compile_debugfile_args(self, rel_obj, pch=False): pdbarr = rel_obj.split('.')[:-1] pdbarr += ['pdb'] - return ['/Fd' + '.'.join(pdbarr)] + args = ['/Fd' + '.'.join(pdbarr)] + # When generating a PDB file with PCH, all compile commands write + # to the same PDB file. Hence, we need to serialize the PDB + # writes using /FS since we do parallel builds. This slows down the + # build obviously, which is why we only do this when PCH is on. + # This was added in Visual Studio 2013 (MSVC 18.0). Before that it was + # always on: https://msdn.microsoft.com/en-us/library/dn502518.aspx + if pch and mesonlib.version_compare(self.version, '>=18.0'): + args = ['/FS'] + args + return args def get_link_debugfile_args(self, targetfile): pdbarr = targetfile.split('.')[:-1] |