JS is being compiled with exceptions enabled

RESOLVED FIXED in mozilla16

Status

RESOLVED FIXED
7 years ago
a year ago

People

(Reporter: espindola, Assigned: espindola)

Tracking

unspecified
mozilla16
x86_64
Linux
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 2 obsolete attachments)

Search for jsarray in

http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/dteller@mozilla.com-34851bd63189/try-macosx64/try-macosx64-bm31-try1-build2866.txt.gz

and you will find

/usr/local/bin/ccache /usr/bin/g++-4.2 -arch i386 -o jsarray.o -c  -fvisibility=hidden -DEXPORT_JS_API -DJS_HAS_CTYPES -DDLL_PREFIX=\"lib\" -DDLL_SUFFIX=\".dylib\" -DNO_NSPR_10_SUPPORT -Ictypes/libffi/include -I.  -I/builds/slave/try-osx64/build/js/src/../../mfbt/double-conversion -I/builds/slave/try-osx64/build/js/src -I. -I./../../dist/include -I./../../dist/include/nsprpub  -I/builds/slave/try-osx64/build/obj-firefox/i386/dist/include/nspr  -I/builds/slave/try-osx64/build/js/src -I/builds/slave/try-osx64/build/js/src/assembler -I/builds/slave/try-osx64/build/js/src/yarr  -fPIC  -fno-rtti -Wall -Wpointer-arith -Woverloaded-virtual -Werror=return-type -Wempty-body -Wno-ctor-dtor-privacy -Wno-overlength-strings -Wno-invalid-offsetof -Wno-variadic-macros -Wcast-align -isysroot /Developer/SDKs/MacOSX10.6.sdk -fno-common -ffunction-sections -fdata-sections -pthread -pipe  -DNDEBUG -DTRIMMED -g -O3 -fno-stack-protector -fomit-frame-pointer -DUSE_SYSTEM_MALLOC=1 -DENABLE_ASSEMBLER=1 -DENABLE_JIT=1   -DMOZILLA_CLIENT -include ./js-confdefs.h -MD -MF .deps/jsarray.pp /builds/slave/try-osx64/build/js/src/jsarray.cpp

note that -fno-exceptions is missing.
Assignee: nobody → respindola
Created attachment 630783 [details] [diff] [review]
Use -fno-exceptions when building js

https://tbpl.mozilla.org/?tree=Try&rev=bf908d98c723

The build log at

https://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/respindola@mozilla.com-bf908d98c723/try-macosx64/try-macosx64-bm31-try1-build2888.txt.gz

shows that we are passing -fno-exceptions. The m-c build on which the try is based is http://ftp.mozilla.org/pub/mozilla.org/firefox/tinderbox-builds/mozilla-central-macosx64/1339016539/.

Comparing the two dmgs we find that the one on try is 253 KB smaller and XUL is 638 KB smaller.
Attachment #630783 - Flags: review?(khuey)
I just noticed that the windows builders are not using the -gr- flag. I will debug it tomorrow.
Created attachment 630965 [details] [diff] [review]
Use -fno-exceptions when building js

https://tbpl.mozilla.org/?tree=Try&rev=10b2db4acfdd

This should work on windows too. This patch is on top of

https://tbpl.mozilla.org/?rev=7e4c2abb9fc9

I will compare the build sizes when it finishes.
Attachment #630783 - Attachment is obsolete: true
Attachment #630783 - Flags: review?(khuey)
Attachment #630965 - Flags: review?(khuey)

Updated

7 years ago
Blocks: 733905
Comment on attachment 630965 [details] [diff] [review]
Use -fno-exceptions when building js

Review of attachment 630965 [details] [diff] [review]:
-----------------------------------------------------------------

bsmedberg needs to sign off on removing --enable-cpp-rtti here.
Attachment #630965 - Flags: review?(khuey)
Attachment #630965 - Flags: review?(benjamin)
Attachment #630965 - Flags: review+

Comment 5

7 years ago
Comment on attachment 630965 [details] [diff] [review]
Use -fno-exceptions when building js

The C++ RTTI flags can be very useful for debugging because you can in a debugger know the precise type of classes with vtables. I think we should keep the optional support for RTTI.
Attachment #630965 - Flags: review?(benjamin) → review-
Created attachment 631126 [details] [diff] [review]
Use -fno-exceptions when building js

https://tbpl.mozilla.org/?tree=Try&rev=9e9e1a9149f1
Attachment #630965 - Attachment is obsolete: true
Attachment #631126 - Flags: review?(khuey)
(In reply to Benjamin Smedberg  [:bsmedberg] from comment #5)
> Comment on attachment 630965 [details] [diff] [review]
> Use -fno-exceptions when building js
> 
> The C++ RTTI flags can be very useful for debugging because you can in a
> debugger know the precise type of classes with vtables. I think we should
> keep the optional support for RTTI.

gdb can do this without needing RTTI by just looking at the vtable pointer and knowing what type it's for.

Comment 8

7 years ago
(In reply to Jeff Muizelaar [:jrmuizel] from comment #7)
> (In reply to Benjamin Smedberg  [:bsmedberg] from comment #5)
> > Comment on attachment 630965 [details] [diff] [review]
> > Use -fno-exceptions when building js
> > 
> > The C++ RTTI flags can be very useful for debugging because you can in a
> > debugger know the precise type of classes with vtables. I think we should
> > keep the optional support for RTTI.
> 
> gdb can do this without needing RTTI by just looking at the vtable pointer
> and knowing what type it's for.

True, but not all types have vtables.  :-)
(In reply to Ehsan Akhgari [:ehsan] from comment #8)
> (In reply to Jeff Muizelaar [:jrmuizel] from comment #7)
> > (In reply to Benjamin Smedberg  [:bsmedberg] from comment #5)
> > > Comment on attachment 630965 [details] [diff] [review]
> > > Use -fno-exceptions when building js
> > > 
> > > The C++ RTTI flags can be very useful for debugging because you can in a
> > > debugger know the precise type of classes with vtables. I think we should
> > > keep the optional support for RTTI.
> > 
> > gdb can do this without needing RTTI by just looking at the vtable pointer
> > and knowing what type it's for.
> 
> True, but not all types have vtables.  :-)

But RTTI only adds information when you have one.

Comment 10

7 years ago
(In reply to Jeff Muizelaar [:jrmuizel] from comment #9)
> (In reply to Ehsan Akhgari [:ehsan] from comment #8)
> > (In reply to Jeff Muizelaar [:jrmuizel] from comment #7)
> > > (In reply to Benjamin Smedberg  [:bsmedberg] from comment #5)
> > > > Comment on attachment 630965 [details] [diff] [review]
> > > > Use -fno-exceptions when building js
> > > > 
> > > > The C++ RTTI flags can be very useful for debugging because you can in a
> > > > debugger know the precise type of classes with vtables. I think we should
> > > > keep the optional support for RTTI.
> > > 
> > > gdb can do this without needing RTTI by just looking at the vtable pointer
> > > and knowing what type it's for.
> > 
> > True, but not all types have vtables.  :-)
> 
> But RTTI only adds information when you have one.

Indeed!  Ignoring me sometimes is the best option.  ;-)
The last try was lost in the tbpl upgrade :-(
I pushed again to
https://tbpl.mozilla.org/?tree=Try&rev=21d1d6762f1e

and will push to m-i once the builds are done. I kept the rtti option. At least it is now in a central and easy to remove location  if it really has no use :-)
https://hg.mozilla.org/mozilla-central/rev/6536514d4baf

Per the tree rules, please set the target milestone when landing on inbound.
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Target Milestone: --- → mozilla16
(In reply to Ryan VanderMeulen from comment #13)
> https://hg.mozilla.org/mozilla-central/rev/6536514d4baf
> 
> Per the tree rules, please set the target milestone when landing on inbound.

First time I am told to do that. What is the rationale?

Updated

7 years ago
Blocks: 757568

Updated

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