diff options
author | Luke Elliott <luke.b.elliott@gmail.com> | 2023-02-12 15:06:55 +0000 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2023-02-19 03:04:06 +0530 |
commit | 1b4bc965aac8a6650376e8e247c41f657fb254c5 (patch) | |
tree | 27f263c2d6921cfd8f49fc940f7815b81bdd589b | |
parent | 96f6cbe66d158d90a02b2b708e64c206b39a0b80 (diff) | |
download | meson-1b4bc965aac8a6650376e8e247c41f657fb254c5.tar.gz |
compilers: -fprofile-correction is only a valid switch with gcc itself.
clang++ main.cpp -fprofile-correction
clang-15: warning: optimization flag '-fprofile-correction' is not supported
[-Wignored-optimization-argument]
-rw-r--r-- | mesonbuild/compilers/mixins/gnu.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/mesonbuild/compilers/mixins/gnu.py b/mesonbuild/compilers/mixins/gnu.py index 2f7de254f..022e7fda0 100644 --- a/mesonbuild/compilers/mixins/gnu.py +++ b/mesonbuild/compilers/mixins/gnu.py @@ -445,7 +445,7 @@ class GnuLikeCompiler(Compiler, metaclass=abc.ABCMeta): return ['-fprofile-generate'] def get_profile_use_args(self) -> T.List[str]: - return ['-fprofile-use', '-fprofile-correction'] + return ['-fprofile-use'] def get_gui_app_args(self, value: bool) -> T.List[str]: return ['-mwindows' if value else '-mconsole'] @@ -644,3 +644,6 @@ class GnuCompiler(GnuLikeCompiler): if linker == 'mold' and mesonlib.version_compare(version, '>=12.0.1'): return ['-fuse-ld=mold'] return super().use_linker_args(linker, version) + + def get_profile_use_args(self) -> T.List[str]: + return super().get_profile_use_args() + ['-fprofile-correction'] |