|
|
@ -1240,7 +1240,7 @@ class BuildTarget(Target): |
|
|
|
raise InvalidArguments(f'Invalid rust_dependency_map "{rust_dependency_map}": must be a dictionary with string values.') |
|
|
|
raise InvalidArguments(f'Invalid rust_dependency_map "{rust_dependency_map}": must be a dictionary with string values.') |
|
|
|
self.rust_dependency_map = rust_dependency_map |
|
|
|
self.rust_dependency_map = rust_dependency_map |
|
|
|
|
|
|
|
|
|
|
|
def _extract_pic_pie(self, kwargs, arg: str, option: str): |
|
|
|
def _extract_pic_pie(self, kwargs: T.Dict[str, T.Any], arg: str, option: str) -> bool: |
|
|
|
# Check if we have -fPIC, -fpic, -fPIE, or -fpie in cflags |
|
|
|
# Check if we have -fPIC, -fpic, -fPIE, or -fpie in cflags |
|
|
|
all_flags = self.extra_args['c'] + self.extra_args['cpp'] |
|
|
|
all_flags = self.extra_args['c'] + self.extra_args['cpp'] |
|
|
|
if '-f' + arg.lower() in all_flags or '-f' + arg.upper() in all_flags: |
|
|
|
if '-f' + arg.lower() in all_flags or '-f' + arg.upper() in all_flags: |
|
|
@ -1248,8 +1248,8 @@ class BuildTarget(Target): |
|
|
|
return True |
|
|
|
return True |
|
|
|
|
|
|
|
|
|
|
|
k = OptionKey(option) |
|
|
|
k = OptionKey(option) |
|
|
|
if arg in kwargs: |
|
|
|
if kwargs.get(arg) is not None: |
|
|
|
val = kwargs[arg] |
|
|
|
val = T.cast('bool', kwargs[arg]) |
|
|
|
elif k in self.environment.coredata.options: |
|
|
|
elif k in self.environment.coredata.options: |
|
|
|
val = self.environment.coredata.options[k].value |
|
|
|
val = self.environment.coredata.options[k].value |
|
|
|
else: |
|
|
|
else: |
|
|
|