diff options
author | Jan Alexander Steffens (heftig) <jan.steffens@gmail.com> | 2018-10-28 15:59:03 +0000 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2018-10-28 19:20:31 +0200 |
commit | e4da09b8f9ea1bd66d24e16dc68469148eee9716 (patch) | |
tree | 5a6eb030cdfc261dd8dc3cd2003d376f5b4b1d68 | |
parent | 807981889f0cbecf165d0dc8bfb1e980adac58d8 (diff) | |
download | meson-e4da09b8f9ea1bd66d24e16dc68469148eee9716.zip meson-e4da09b8f9ea1bd66d24e16dc68469148eee9716.tar.gz meson-e4da09b8f9ea1bd66d24e16dc68469148eee9716.tar.bz2 |
get_base_compile_args: Add -fprofile-correction to -fprofile-use
This allows using the imperfect profiles generated by multithreaded
programs. Without the argument, GCC fails to load them.
Clang just ignores the argument AFAICT.
Fixes https://github.com/mesonbuild/meson/issues/2159
-rw-r--r-- | mesonbuild/compilers/compilers.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py index 458a416..68fbbfa 100644 --- a/mesonbuild/compilers/compilers.py +++ b/mesonbuild/compilers/compilers.py @@ -429,7 +429,7 @@ def get_base_compile_args(options, compiler): if pgo_val == 'generate': args.append('-fprofile-generate') elif pgo_val == 'use': - args.append('-fprofile-use') + args.extend(['-fprofile-use', '-fprofile-correction']) except KeyError: pass try: @@ -475,7 +475,7 @@ def get_base_link_args(options, linker, is_shared_module): if pgo_val == 'generate': args.append('-fprofile-generate') elif pgo_val == 'use': - args.append('-fprofile-use') + args.extend(['-fprofile-use', '-fprofile-correction']) except KeyError: pass try: |