coredata: fix handling of prefix

Which was improperly updated by the option store refactor.

Fixes: #14329
This commit is contained in:
Dylan Baker
2025-03-04 07:43:12 -08:00
committed by Eli Schwartz
parent ec43d02577
commit 751e8f1530
2 changed files with 3 additions and 4 deletions

View File

@@ -571,12 +571,11 @@ class CoreData:
# Set prefix first because it's needed to sanitize other options
pfk = OptionKey('prefix')
if pfk in opts_to_set:
prefix = self.sanitize_prefix(opts_to_set[pfk])
prefix = self.optstore.sanitize_prefix(opts_to_set[pfk])
for key in options.BUILTIN_DIR_NOPREFIX_OPTIONS:
if key not in opts_to_set:
val = options.BUILTIN_OPTIONS[key].prefixed_default(key, prefix)
tmpkey = options.convert_oldkey(key)
dirty |= self.optstore.set_option(tmpkey, val)
dirty |= self.optstore.set_option(key, val)
unknown_options: T.List[OptionKey] = []
for k, v in opts_to_set.items():

View File

@@ -1,4 +1,4 @@
project('linker script', 'c')
project('linker script', 'c', default_options : {'prefix': '/tmp'})
# Solaris 11.4 ld supports --version-script only when you also specify
# -z gnu-version-script-compat