[10.9] ASan builds fail with clang error "unsupported argument 'address' to option 'fsanitize='" using Apple's clang 500.2.78/9



6 years ago
Last year


(Reporter: smichaud, Unassigned)


Firefox Tracking Flags

(Not tracked)


This bug is spun off from bug 930584.  See particularly bug 930584 comment #2 and bug 930584 comment #9.

When doing ASan builds on the Mavericks release (builds 13A598 or 13A603), using the clang from Apple's command line tools for Mavericks (clang 500.2.78 or 500.2.79), you see multiple copies of the following errors:

clang: error: '-fsanitize-undefined-trap-on-error' required with '-fsanitize=address' option
clang: error: unsupported argument 'address' to option 'fsanitize='

Adding -fsanitize-undefined-trap-on-error doesn't get rid of the "unsupported argument" error.

This is almost certainly an Apple bug, as others have concluded here:


We probably have no option but to wait for Apple to fix this.

I understand that the "official" clang releases, available from llvm.org/releases/download.html (among other places), don't have this bug.
Summary: [10.9] ASan builds fail with clang error unsupported argument 'address' to option 'fsanitize=' using Apple's clang 500.2.78/9 → [10.9] ASan builds fail with clang error "unsupported argument 'address' to option 'fsanitize='" using Apple's clang 500.2.78/9
When doing ASan builds for this bug, I used a "standard" mozconfig file plus the following additions:

export CC="/usr/bin/clang"
export CXX="/usr/bin/clang++"
ac_add_options --enable-address-sanitizer
export LDFLAGS="-fsanitize=address"
export HOST_CFLAGS=" "
export HOST_CXXFLAGS=" "
export HOST_LDFLAGS=" "
ac_add_options --disable-jemalloc
ac_add_options --disable-crashreporter
ac_add_options --disable-elf-hack
ac_add_options --enable-debug-symbols
ac_add_options --disable-install-strip
I should have mentioned that "ASan" means "Address Sanitizer".

See https://developer.mozilla.org/en-US/docs/Building_Firefox_with_Address_Sanitizer.
ASan builds work just fine with Apple's clang version 425.0.28.


Last year
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.