Closed Bug 1181441 Opened 6 years ago Closed 6 years ago

Check for --disable-elf-tls in rust toolchain


(Firefox Build System :: General, defect)

Not set


(firefox42 fixed)

Tracking Status
firefox42 --- fixed


(Reporter: rillian, Assigned: rillian)




(1 file)

Stock rustc assumes atomic thread-local storage, which prevents linking with MACOSX_DEPLOYMENT_TARGET=10.6 and earlier, which we need to support for Firefox.

In rustc 1.1 and later there's a --disable-elf-tls configure switch which allows building an alternate toolchain which works around this issue.

Therefore when targetting 10.6 gecko's configure should test linkage against rust code to determine whether the available toolchain was built with this option.
When --enable-rust and MACOSX_DEPLOYMENT_TARGET=10.6, compile and test linking to a rust library to see if the toolchain has the necessary workarounds.

If it works, great, otherwise failt to build with suggested solutions as before.

This is a necessary for integration builds with rust enabled.
Attachment #8630870 - Flags: review?(ted)
Green on try, as expected since this doesn't change the default build.
Tooltool manifest for a mac build of rust 1.1.0 with --disable-elf-tls.

"size": 61570496, 
"unpack": true,
"digest": "f4b40ac1caf95720e4e833e8f9f00bffd307b28da675e97b21decb15430310eb67cc2603e0d86a2760522bbe5cd78ca099bd17103bf8e64d28140f825aeed678", 
"algorithm": "sha512", 
"filename": "rustc.tar.xz"
Comment on attachment 8630870 [details] [diff] [review]
Configure check for rustc linkage

Review of attachment 8630870 [details] [diff] [review]:

Bleh. Does rustc have a way to dump the configure options it was built with? It would be great if we could just ask the compiler if it supported this instead of having to compile a test program to find out.

r+ to unblock you, but I'd really like to not have to accumulate garbage in configure around a brand new toolchain that we wrote.
Attachment #8630870 - Flags: review?(ted) → review+

AFAIK there's no way to dump the configure options. I filed

Would it help to hide it in build/autoconf/rust.m4?

I was going to look at the semver idea myself just for my own sanity building packages, and we already parse the version string, so I think that's the most direct solution. I could put it in manually in my builds now, but that doesn't help anyone else.
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.