be more specific about the LLVM target on OS X
Categories
(Firefox Build System :: General, enhancement)
Tracking
(firefox69 fixed)
| Tracking | Status | |
|---|---|---|
| firefox69 | --- | fixed |
People
(Reporter: froydnj, Assigned: froydnj)
References
Details
Attachments
(1 file)
|
47 bytes,
text/x-phabricator-request
|
Details |
| Assignee | ||
Comment 1•7 years ago
|
||
Our current OS X builds use --target=x86_64-darwin11 (which
corresponds to OS X 10.7). This target is problematic for two reasons:
- We're actually targeting for OS X 10.9 (
MACOSX_DEPLOYMENT_TARGET); - It's slightly different from the default Rust target.
Let's address these problems in reverse order: differences from the Rust
target are bad, because the --target we provide to clang and the
Rust target find their way into LLVM bitcode files and the linker will
refuse to link together bitcode files that have incompatible targets.
Why are the two incompatible? The current --target doesn't have a
"vendor" in triple-speak, whereas the Rust one has "apple" as the
vendor (x86_64-apple-darwin) We therefore need to change the
--target we pass to clang to have a vendor of "apple".
This need is behind the {init,toolchain}.configure changes,
but it has ramifications elsewhere, because clang looks for
--target-prefixed build tools. So we have to change the --target
for cctools to get the right tool prefixes and we have to change the
--target for building clang ourselves so that those builds can find
the newly renamed cctools.
Once we've done, that's really enough; we don't *need to address the
first problem: While the --target might be x86_64-apple-darwin11,
both clang and rustc will dynamically choose the target triple that
eventually lands in LLVM bitcode files based on
MACOSX_DEPLOYMENT_TARGET, which we set in all builds. But the current
target is slightly misleading, and the cctools don't need to be prefixed
with a particular Darwin version, since they work for all Darwin
targets. Let's just drop the "11" from the --target and eliminate a
little bit of confusion.
Updated•7 years ago
|
Comment 3•6 years ago
|
||
Backed out changeset 2e560a9e4bcf (bug 1551690) for build bustages
Backout: https://hg.mozilla.org/integration/autoland/rev/3166a00a4f13f0bca069681a382c0e8af814eb3f
Failure push: https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=2e560a9e4bcffc8476086c1da25c7412cd9a1805
Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=247458990&repo=autoland&lineNumber=996
[task 2019-05-21T00:49:01.351Z] 00:49:01 ERROR - Traceback (most recent call last):
[task 2019-05-21T00:49:01.351Z] 00:49:01 INFO - File "/builds/worker/workspace/build/src/configure.py", line 132, in <module>
[task 2019-05-21T00:49:01.351Z] 00:49:01 INFO - sys.exit(main(sys.argv))
[task 2019-05-21T00:49:01.351Z] 00:49:01 INFO - File "/builds/worker/workspace/build/src/configure.py", line 38, in main
[task 2019-05-21T00:49:01.351Z] 00:49:01 INFO - sandbox.run(os.path.join(os.path.dirname(file), 'moz.configure'))
[task 2019-05-21T00:49:01.351Z] 00:49:01 INFO - File "/builds/worker/workspace/build/src/python/mozbuild/mozbuild/configure/init.py", line 441, in run
[task 2019-05-21T00:49:01.351Z] 00:49:01 INFO - self._value_for(option)
[task 2019-05-21T00:49:01.351Z] 00:49:01 INFO - File "/builds/worker/workspace/build/src/python/mozbuild/mozbuild/configure/init.py", line 528, in _value_for
[task 2019-05-21T00:49:01.351Z] 00:49:01 INFO - return self._value_for_option(obj)
[task 2019-05-21T00:49:01.351Z] 00:49:01 INFO - File "/builds/worker/workspace/build/src/python/mozbuild/mozbuild/util.py", line 947, in method_call
[task 2019-05-21T00:49:01.351Z] 00:49:01 INFO - cache[args] = self.func(instance, *args)
[task 2019-05-21T00:49:01.351Z] 00:49:01 INFO - File "/builds/worker/workspace/build/src/python/mozbuild/mozbuild/configure/init.py", line 559, in _value_for_option
[task 2019-05-21T00:49:01.351Z] 00:49:01 INFO - value, option_string = self._helper.handle(option)
[task 2019-05-21T00:49:01.352Z] 00:49:01 INFO - File "/builds/worker/workspace/build/src/python/mozbuild/mozbuild/configure/options.py", line 504, in handle
[task 2019-05-21T00:49:01.352Z] 00:49:01 INFO - extra_ret = option.get_value(extra_arg, extra_origin)
[task 2019-05-21T00:49:01.352Z] 00:49:01 INFO - File "/builds/worker/workspace/build/src/python/mozbuild/mozbuild/configure/options.py", line 377, in get_value
[task 2019-05-21T00:49:01.352Z] 00:49:01 INFO - self.nargs != 1) else ''
[task 2019-05-21T00:49:01.352Z] 00:49:01 INFO - mozbuild.configure.options.InvalidOptionError: --with-toolchain-prefix takes 1 value
[task 2019-05-21T00:49:01.387Z] 00:49:01 INFO - *** Fix above errors and then restart with
[task 2019-05-21T00:49:01.387Z] 00:49:01 INFO - "./mach build"
[task 2019-05-21T00:49:01.387Z] 00:49:01 INFO - client.mk:111: recipe for target 'configure' failed
[task 2019-05-21T00:49:01.387Z] 00:49:01 INFO - make: *** [configure] Error 1
[task 2019-05-21T00:49:01.455Z] 00:49:01 ERROR - Return code: 2
[task 2019-05-21T00:49:01.455Z] 00:49:01 WARNING - setting return code to 2
[task 2019-05-21T00:49:01.455Z] 00:49:01 FATAL - 'mach build -v' did not run successfully. Please check log for errors.
[task 2019-05-21T00:49:01.455Z] 00:49:01 FATAL - Running post_fatal callback...
[task 2019-05-21T00:49:01.455Z] 00:49:01 FATAL - Exiting -1
| Assignee | ||
Comment 4•6 years ago
|
||
Thanks Python:
https://hg.mozilla.org/integration/autoland/rev/2e560a9e4bcf#l6.19
Guess having a tuple there for every other platform worked just fine.
Try push with fixed line:
https://hg.mozilla.org/try/rev/17b52b4d7f88d6398198111b8f5d2c5f616e111a#l6.19
https://treeherder.mozilla.org/#/jobs?repo=try&revision=7acc395ed9c92f6ba7ca220a15d02af09826c3b9
Comment 6•6 years ago
|
||
Backed out for toolchain failures
Push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&resultStatus=testfailed%2Cbusted%2Cexception&selectedJob=247553636&revision=ae7096d1add7bc70cd996485b423a18fe287a4e3
Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=247553636&repo=autoland&lineNumber=582
Backout: https://hg.mozilla.org/integration/autoland/rev/6cead9170981e6714d63dcd6d3032745ed661fe8
| Assignee | ||
Comment 7•6 years ago
|
||
Ugh, sorry, I totally missed the tools build failures in the previous push. :(
Comment 9•6 years ago
|
||
| bugherder | ||
Description
•