Closed
Bug 574346
(clang-macosx)
Opened 14 years ago
Closed 14 years ago
[meta] Support building with Clang
Categories
(Firefox Build System :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: Nomis101, Unassigned)
References
Details
(Keywords: meta)
Apple is moving from GCC to LLVM/Clang. Therefore gcc-4.0 doesn't exist anymore in Xcode 4 and gcc-4.2 isn't actively maintained anymore ("...because we're just not fixing bugs in GCC anymore.", WWDC 2010 Session Video, Session 312, 6:22 min). So it is necessary to be able to build Mozilla applications with LLVM/Clang.
To build with Clang you need Xcode 4, because only Xcode 4 includes clang++ (for Xcode 4 OS X 10.6.3 or higher is required). You also can get Clang from http://clang.llvm.org/get_started.html. Apple says building with Clang is faster, it gives a performance win, it has great user features and better error messages. Clang had successfully built the Boost library, and had passed almost all tests: http://blog.llvm.org/2010/05/clang-builds-boost.html
For more informations I recommend the WWDC 2010 Session Videos about LLVM:
http://developer.apple.com/videos/wwdc/2010/ (in the section "Developer Tools").
Note that LLVM-GCC is different to Clang:
GCC-4.2 -> Parser (GCC) / Code Generator (GCC)
LLVM-GCC -> Parser (GCC) / Code Generator (LLVM)
Clang -> Parser (Clang-LLVM) / Code Generator (LLVM)
Note to the C++ language feature:
"Clang strives to strictly conform to the C++ standard. That means it will reject invalid C++ code that another compiler may accept. If Clang reports errors in your code, please check the C++ Compatibility page to see whether they are C++-conformance bugs and how you can fix them."
http://clang.llvm.org/docs/UsersManual.html#cxx
Error messages from Clang are different from gcc error messages.
Because Xcode 4 isn't officially released yet, I've only tested to build with
clang version 2.0 (trunk 106670)
And I found two issues. As soon as Xcode 4 is available I will test it with Xcode 4 clang version to see if it gives me the same issues.
Comment 2•14 years ago
|
||
See http://llvm.org/bugs/show_bug.cgi?id=5511 ; I'm working on submitting the necessary patches.
Summary: [meta] Do anything that is necessary to build with Clang on Mac OS X 10.6 → [meta] Support building with Clang on Mac
Updated•14 years ago
|
OS: Mac OS X → Windows 7
Updated•14 years ago
|
OS: Windows 7 → Mac OS X
Depends on: 622138
Depends on: 622142
Depends on: 622144
Depends on: 623116
Depends on: 623117
Depends on: 623119
Depends on: 623121
Depends on: 623122
Depends on: 623123
Depends on: 623126
Depends on: 623129
Depends on: 623132
Updated•14 years ago
|
Alias: clang
Depends on: 629815
Depends on: 629839
Depends on: 630649
Depends on: 631928
Depends on: 632188
Updated•14 years ago
|
OS: Mac OS X → All
Hardware: x86_64 → All
Summary: [meta] Support building with Clang on Mac → [meta] Support building with Clang
Depends on: 634745
Depends on: 634763
Depends on: 635790
Depends on: 638149
Depends on: 639204
(In reply to comment #1)
> Because Xcode 4 isn't officially released yet
Now it is, Apple has today releases Xcode 4 with clang++
http://developer.apple.com/xcode/
Depends on: 648871
Depends on: 648872
Depends on: 648873
On OS X it is possible to build firefox with clang 2.9 and on Linux with 3.0. I am closing this bug. Bug 647580 tracks building with xcode 4.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Unfortunately the Linux build with 3.0 fails:
...
var/tmp/mozilla-central/js/src/jsinterp.cpp:3467:5: error: indirect goto might cross protected scopes
RELATIONAL_OP(<=);
^
/var/tmp/mozilla-central/js/src/jsinterp.cpp:3457:9: note: instantiated from:
TRY_BRANCH_AFTER_COND(cond, 2); \
^
/var/tmp/mozilla-central/js/src/jsinterp.cpp:3005:17: note: instantiated from:
BRANCH(len); \
^
/var/tmp/mozilla-central/js/src/jsinterp.cpp:2422:9: note: instantiated from:
DO_OP(); \
^
/var/tmp/mozilla-central/js/src/jsinterp.cpp:2193:33: note: instantiated from:
JS_EXTENSION_(goto *jumpTable[op]); \
^
/var/tmp/mozilla-central/js/src/jsinterp.cpp:3467:5: note: instantiated from:
RELATIONAL_OP(<=);
^
/var/tmp/mozilla-central/js/src/jsinterp.cpp:3457:9: note: instantiated from:
TRY_BRANCH_AFTER_COND(cond, 2); \
^
/var/tmp/mozilla-central/js/src/jsinterp.cpp:3005:17: note: instantiated from:
BRANCH(len); \
^
/var/tmp/mozilla-central/js/src/jsinterp.cpp:2422:9: note: instantiated from:
DO_OP(); \
^
...
Comment 6•13 years ago
|
||
Depends on: 671711
Depends on: 727233
Depends on: 727226
Depends on: 727221
Depends on: 727220
Depends on: 727145
Comment 7•13 years ago
|
||
Spurred by the multiple (I think it was 3) breakages of Clang/m-c in the past week or so, I set up a personal Jenkins builder to continuously build m-c using Clang. You can find the build information at http://jenkins.gregoryszorc.com:9000/
There are 4 build configurations. Each is running on Ubuntu 11.10 x64. I have debug and release builds going for each of LLVM 3.0 and LLVM built from the LLVM Subversion repository.
Currently, Jenkins will alert #pymake on build failures. If you want additional notifications (I can configure it to send email, etc), drop me a line on IRC and I'll hook you up.
Also, I make no guarantees for the availability of the service.
Depends on: 731503
Depends on: 733721
Depends on: 737909
Depends on: 774015
Depends on: 773768
Depends on: 774017
Depends on: 774018
Depends on: 774019
Depends on: 774020
Depends on: 774021
Depends on: 774022
Depends on: 774023
Depends on: 774024
Depends on: 774025
Depends on: 774028
Depends on: 774029
Depends on: 774030
Depends on: 774031
Depends on: 774033
Depends on: 774037
Depends on: 774038
Depends on: 774039
Depends on: 774040
Depends on: 774041
Depends on: 774120
Depends on: 774671
Depends on: 774796
Does Firefox3.6.10 supported for building with Clang? We have build errors when building firefox3.6.10 with Clang on Mac OS X Lion.
(In reply to Yun Guo from comment #8)
> Does Firefox3.6.10 supported for building with Clang? We have build errors
> when building firefox3.6.10 with Clang on Mac OS X Lion.
I never tried (joined mozilla during the firefox4 days), but would be surprised if 3.6.10 would build with clang.
Building 3.6.10 with anything is not supported anymore, and has not been for months or years.
Updated•7 years ago
|
Product: Core → Firefox Build System
Updated•7 years ago
|
Alias: clang → clang-macosx
OS: All → Mac OS X
You need to log in
before you can comment on or make changes to this bug.
Description
•