rust: Add unique metadata id

This solves StableCrateId collision when using multiple versions of the
same crate.
pull/12461/head
Xavier Claessens 1 year ago committed by Xavier Claessens
parent 4c5e976a75
commit 91f2050813
  1. 1
      mesonbuild/backend/ninjabackend.py

@ -1948,6 +1948,7 @@ class NinjaBackend(backends.Backend):
depfile = os.path.join(target.subdir, target.name + '.d')
args += ['--emit', f'dep-info={depfile}', '--emit', f'link={target_name}']
args += ['--out-dir', self.get_target_private_dir(target)]
args += ['-C', 'metadata=' + target.get_id()]
args += target.get_extra_args('rust')
# Rustc always use non-debug Windows runtime. Inject the one selected

Loading…
Cancel
Save