-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Build] Allow exceptions and runtime type information #29368
Comments
This is not "overriding". This is a build config option ( @xvortep It seems like the right thing to do here is to add a similar enable_exceptions build config option, right? |
Sounds right. Thank you. |
Build issue(s)
Greetings,
Some SDKs work with exceptions and require rtti. In order for such SDKs to be integrated, flags like -fexception and -frtti have to be set. As far as I can see, there are no methods for setting -fexceptions and -frtti flags other than changing the compiler/BUILD.gn file.
Additionally, rtti flag can be set by providing an additional argument to gn:
enable_rtti = true
which overrides these few lines in compiler/BUILD.gn:
declare_args() { /# Enable Runtime Type Information (RTTI) enable_rtti = current_os == "mac" || current_os == "ios" }
This method does not sit well with me because of overriding.
However, such mechanism doesn't exist for exceptions, so the only way to set the -fexceptions flag is to change this line in compiler/BUILD.gn:
config("exceptions_default") { configs = [ ":no_exceptions" ] }
to:
config("exceptions_default") { configs = [ ":exceptions" ] }
Platform: Linux ubuntu 20.04
If there is a way to do this adequately, please correct me.
Thanks.
Platform
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: