Skip to content

Commit

Permalink
coredata: fix handling of prefix
Browse files Browse the repository at this point in the history
Which was improperly updated by the option store refactor.

Fixes: mesonbuild#14329
  • Loading branch information
dcbaker committed Mar 4, 2025
1 parent c2d7957 commit 3a527e4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions mesonbuild/coredata.py
Original file line number Diff line number Diff line change
Expand Up @@ -572,12 +572,11 @@ def set_options(self, opts_to_set: T.Dict[OptionKey, T.Any], subproject: str = '
# 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():
Expand Down
2 changes: 1 addition & 1 deletion test cases/linuxlike/3 linker script/meson.build
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 3a527e4

Please sign in to comment.