-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Add emulated TLS support #117873
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
Add emulated TLS support #117873
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
use crate::spec::{base, SanitizerSet, TargetOptions}; | ||
use crate::spec::{base, SanitizerSet, TargetOptions, TlsModel}; | ||
|
||
pub fn opts() -> TargetOptions { | ||
let mut base = base::linux::opts(); | ||
base.os = "android".into(); | ||
base.is_like_android = true; | ||
base.default_dwarf_version = 2; | ||
base.tls_model = TlsModel::Emulated; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is to match old behavior. emutls is now disabled when not specified, which can cause runtime errors. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To keep old behavior we also need to specify emutls for these targets. https://github.com/llvm/llvm-project/blob/llvmorg-18-init/llvm/include/llvm/TargetParser/Triple.h#L991 from #117873 (comment) |
||
base.has_thread_local = false; | ||
base.supported_sanitizers = SanitizerSet::ADDRESS; | ||
// This is for backward compatibility, see https://github.com/rust-lang/rust/issues/49867 | ||
|
Uh oh!
There was an error while loading. Please reload this page.