Closed Bug 1764442 Opened 2 years ago Closed 2 years ago

mozbuild.configure.options.InvalidOptionError: RUSTFLAGS takes 1 value if RUSTFLAGS contains comma

Categories

(Firefox Build System :: General, defect)

Firefox 99
defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1474486

People

(Reporter: alex_y_xu, Unassigned)

References

Details

Steps to reproduce:

  1. Download and extract Firefox source code.
  2. export RUSTFLAGS="-Clink-arg=-Wl,-O2" (or any value containing a comma)
  3. ./mach build

Expected behavior:

Firefox builds.

Actual behavior:

0:01.82 Traceback (most recent call last):
0:01.82 File "/tmp/portage/www-client/firefox-99.0/work/firefox-99.0/configure.py", line 349, in <module>
0:01.83 sys.exit(main(sys.argv))
0:01.83 File "/tmp/portage/www-client/firefox-99.0/work/firefox-99.0/configure.py", line 131, in main
0:01.83 sandbox.run(os.path.join(os.path.dirname(file), "moz.configure"))
0:01.83 File "/tmp/portage/www-client/firefox-99.0/work/firefox-99.0/python/mozbuild/mozbuild/configure/init.py", line 509, in ru
n
0:01.83 self._value_for(option)
0:01.83 File "/tmp/portage/www-client/firefox-99.0/work/firefox-99.0/python/mozbuild/mozbuild/configure/init.py", line 614, in _v
alue_for
0:01.83 return self._value_for_option(obj)
0:01.83 File "/tmp/portage/www-client/firefox-99.0/work/firefox-99.0/python/mozbuild/mozbuild/util.py", line 1061, in method_call
0:01.83 cache[args] = self.func(instance, *args)
0:01.83 File "/tmp/portage/www-client/firefox-99.0/work/firefox-99.0/python/mozbuild/mozbuild/configure/init.py", line 649, in _v
alue_for_option
0:01.83 value, option_string = self._helper.handle(option)
0:01.83 File "/tmp/portage/www-client/firefox-99.0/work/firefox-99.0/python/mozbuild/mozbuild/configure/options.py", line 593, in han
dle
0:01.83 ret = option.get_value(arg, origin)
0:01.83 File "/tmp/portage/www-client/firefox-99.0/work/firefox-99.0/python/mozbuild/mozbuild/configure/options.py", line 450, in get
_value
0:01.83 raise InvalidOptionError(
0:01.83 mozbuild.configure.options.InvalidOptionError: RUSTFLAGS takes 1 value

Additional information:

this doesn't occur if LDFLAGS contains a comma. similar to LDFLAGS, RUSTFLAGS must be treated as having a single unsplittable value.

Hm, arguably this is a special case of bug 1474486.

Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.