diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2018-08-27 22:30:23 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-27 22:30:23 +0300 |
commit | 1ffc8de5e8cc79dbaa54fd1ac02b6b4c5edac7a1 (patch) | |
tree | 916eb6a1c988386d9848115709dd9c6b199a5a5a /mesonbuild/compilers/compilers.py | |
parent | 731906504efb57aa9ae86685501f1d3a0aa22121 (diff) | |
parent | fd2c3b4c77ac1977d254301876525f8e631a940a (diff) | |
download | meson-1ffc8de5e8cc79dbaa54fd1ac02b6b4c5edac7a1.zip meson-1ffc8de5e8cc79dbaa54fd1ac02b6b4c5edac7a1.tar.gz meson-1ffc8de5e8cc79dbaa54fd1ac02b6b4c5edac7a1.tar.bz2 |
Merge pull request #3981 from GoaLitiuM/d-win-fixes
Fix D support on Windows
Diffstat (limited to 'mesonbuild/compilers/compilers.py')
-rw-r--r-- | mesonbuild/compilers/compilers.py | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py index 95f937d..352c49e 100644 --- a/mesonbuild/compilers/compilers.py +++ b/mesonbuild/compilers/compilers.py @@ -196,22 +196,22 @@ rust_buildtype_args = {'plain': [], d_gdc_buildtype_args = {'plain': [], 'debug': [], - 'debugoptimized': ['-O'], - 'release': ['-O3', '-frelease'], + 'debugoptimized': ['-finline-functions'], + 'release': ['-frelease', '-finline-functions'], 'minsize': [], } d_ldc_buildtype_args = {'plain': [], 'debug': [], - 'debugoptimized': ['-O'], - 'release': ['-O3', '-release'], + 'debugoptimized': ['-enable-inlining', '-Hkeep-all-bodies'], + 'release': ['-release', '-enable-inlining', '-Hkeep-all-bodies'], 'minsize': [], } d_dmd_buildtype_args = {'plain': [], 'debug': [], - 'debugoptimized': ['-O'], - 'release': ['-O', '-release'], + 'debugoptimized': ['-inline'], + 'release': ['-release', '-inline'], 'minsize': [], } @@ -459,6 +459,15 @@ def get_base_link_args(options, linker, is_shared_module): elif as_needed: # -Wl,-dead_strip_dylibs is incompatible with bitcode args.append(linker.get_asneeded_args()) + try: + crt_val = options['b_vscrt'].value + buildtype = options['buildtype'].value + try: + args += linker.get_crt_link_args(crt_val, buildtype) + except AttributeError: + pass + except KeyError: + pass return args class CrossNoRunException(MesonException): |