diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2022-06-08 14:05:00 -0700 |
---|---|---|
committer | Eli Schwartz <eschwartz93@gmail.com> | 2022-06-08 19:18:03 -0400 |
commit | 2c6def856bdc01de200238c0f4204e980de34987 (patch) | |
tree | a77682dd655270e2bd84ca31702815672bb55ee1 /mesonbuild/build.py | |
parent | c3ef52311af84d100be220ae8a9ed58e50100808 (diff) | |
download | meson-2c6def856bdc01de200238c0f4204e980de34987.zip meson-2c6def856bdc01de200238c0f4204e980de34987.tar.gz meson-2c6def856bdc01de200238c0f4204e980de34987.tar.bz2 |
Revert "build: check for -fno-pic and -fno-pie while we're checking for pic and pie"
This reverts commit 5f02d0d9e164a5bcda072d223eaa5bc92b57747e.
Which isn't correct, we have very strange behavior of "force on pie/pic
or let the toolchain do whatever it wants, but you can't turn it off."
Diffstat (limited to 'mesonbuild/build.py')
-rw-r--r-- | mesonbuild/build.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/mesonbuild/build.py b/mesonbuild/build.py index bad9f54..140a73c 100644 --- a/mesonbuild/build.py +++ b/mesonbuild/build.py @@ -1277,13 +1277,10 @@ class BuildTarget(Target): def _extract_pic_pie(self, kwargs, arg: str, option: str): # Check if we have -fPIC, -fpic, -fPIE, or -fpie in cflags - all_flags = set(self.extra_args['c']) | set(self.extra_args['cpp']) - if {f'-f-{arg.lower()}', f'-f-{arg.upper()}'}.issubset(all_flags): + all_flags = self.extra_args['c'] + self.extra_args['cpp'] + if '-f' + arg.lower() in all_flags or '-f' + arg.upper() in all_flags: mlog.warning(f"Use the '{arg}' kwarg instead of passing '-f{arg}' manually to {self.name!r}") return True - elif {f'-fno-{arg.lower()}', f'-fno-{arg.upper()}'}.issubset(all_flags): - mlog.warning(f"Use the '{arg}' kwarg instead of passing '-fno-{arg}' manually to {self.name!r}") - return False k = OptionKey(option) if arg in kwargs: |