Skip to content

Commit

Permalink
compilers: -fprofile-correction is only a valid switch with gcc itself.
Browse files Browse the repository at this point in the history
clang++ main.cpp -fprofile-correction
clang-15: warning: optimization flag '-fprofile-correction' is not supported
 [-Wignored-optimization-argument]
  • Loading branch information
lukester1975 authored and nirbheek committed Feb 18, 2023
1 parent 96f6cbe commit 1b4bc96
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mesonbuild/compilers/mixins/gnu.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ def get_profile_generate_args(self) -> T.List[str]:
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']
Expand Down Expand Up @@ -644,3 +644,6 @@ def use_linker_args(cls, linker: str, version: str) -> T.List[str]:
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']

0 comments on commit 1b4bc96

Please sign in to comment.