Revert "build: check for -fno-pic and -fno-pie while we're checking for pic and pie"
This reverts commit 5f02d0d9e1
.
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."
This commit is contained in:
parent
c3ef52311a
commit
2c6def856b
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue