Skip to content

Commit 1b4bc96

Browse files
lukester1975nirbheek
authored andcommitted
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]
1 parent 96f6cbe commit 1b4bc96

File tree

1 file changed

+4
-1
lines changed
  • mesonbuild/compilers/mixins

1 file changed

+4
-1
lines changed

mesonbuild/compilers/mixins/gnu.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ def get_profile_generate_args(self) -> T.List[str]:
445445
return ['-fprofile-generate']
446446

447447
def get_profile_use_args(self) -> T.List[str]:
448-
return ['-fprofile-use', '-fprofile-correction']
448+
return ['-fprofile-use']
449449

450450
def get_gui_app_args(self, value: bool) -> T.List[str]:
451451
return ['-mwindows' if value else '-mconsole']
@@ -644,3 +644,6 @@ def use_linker_args(cls, linker: str, version: str) -> T.List[str]:
644644
if linker == 'mold' and mesonlib.version_compare(version, '>=12.0.1'):
645645
return ['-fuse-ld=mold']
646646
return super().use_linker_args(linker, version)
647+
648+
def get_profile_use_args(self) -> T.List[str]:
649+
return super().get_profile_use_args() + ['-fprofile-correction']

0 commit comments

Comments
 (0)