Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions clang/lib/Basic/Targets/ARM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,8 @@ bool ARMTargetInfo::handleTargetFeatures(std::vector<std::string> &Features,
HasBTI = 1;
} else if (Feature == "+fullbf16") {
HasFullBFloat16 = true;
} else if (Feature == "+execute-only") {
TLSSupported = false;
}
}

Expand Down
10 changes: 10 additions & 0 deletions clang/test/Sema/arm-execute-only-tls.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// RUN: %clang_cc1 -triple arm-none-eabi -fsyntax-only -verify=default %s
// RUN: %clang_cc1 -triple arm-none-eabi -target-feature +execute-only -fsyntax-only -verify=execute-only %s

// default-no-diagnostics

/// Thread-local code generation requires constant pools because most of the
/// relocations needed for it operate on data, so it cannot be used with
/// -mexecute-only (or -mpure-code, which is aliased in the driver).

_Thread_local int t; // execute-only-error {{thread-local storage is not supported for the current target}}