-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[clang][Driver] Add support for XROS_DEPLOYMENT_TARGET env var #81011
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
Conversation
@llvm/pr-subscribers-clang-driver Author: Cyndy Ishida (cyndyishida) ChangesFull diff: https://github.com/llvm/llvm-project/pull/81011.diff 1 Files Affected:
diff --git a/clang/lib/Driver/ToolChains/Darwin.h b/clang/lib/Driver/ToolChains/Darwin.h
index 5e60b0841d6d5f..10d4b69e5d5f10 100644
--- a/clang/lib/Driver/ToolChains/Darwin.h
+++ b/clang/lib/Driver/ToolChains/Darwin.h
@@ -300,7 +300,7 @@ class LLVM_LIBRARY_VISIBILITY Darwin : public MachO {
WatchOS,
DriverKit,
XROS,
- LastDarwinPlatform = DriverKit
+ LastDarwinPlatform = XROS
};
enum DarwinEnvironmentKind {
NativeEnvironment,
|
@llvm/pr-subscribers-clang Author: Cyndy Ishida (cyndyishida) ChangesFull diff: https://github.com/llvm/llvm-project/pull/81011.diff 1 Files Affected:
diff --git a/clang/lib/Driver/ToolChains/Darwin.h b/clang/lib/Driver/ToolChains/Darwin.h
index 5e60b0841d6d5f..10d4b69e5d5f10 100644
--- a/clang/lib/Driver/ToolChains/Darwin.h
+++ b/clang/lib/Driver/ToolChains/Darwin.h
@@ -300,7 +300,7 @@ class LLVM_LIBRARY_VISIBILITY Darwin : public MachO {
WatchOS,
DriverKit,
XROS,
- LastDarwinPlatform = DriverKit
+ LastDarwinPlatform = XROS
};
enum DarwinEnvironmentKind {
NativeEnvironment,
|
Why didn't this trigger:
|
XROS is missing in the env vars too:
|
Yes. Adding proper |
a9c3775
to
5a60725
Compare
You can test this locally with the following command:git-clang-format --diff ab92f6274b7c3a4b4445d47017bc481aa919545f 5a60725a1abf5a56c4a482c56ea91990074ee17c -- clang/test/Driver/xros-driver-requires-darwin-host.c clang/lib/Driver/ToolChains/Darwin.cpp clang/lib/Driver/ToolChains/Darwin.h View the diff from clang-format here.diff --git a/clang/lib/Driver/ToolChains/Darwin.cpp b/clang/lib/Driver/ToolChains/Darwin.cpp
index cc1219d69d..0ee2b074a4 100644
--- a/clang/lib/Driver/ToolChains/Darwin.cpp
+++ b/clang/lib/Driver/ToolChains/Darwin.cpp
@@ -1897,13 +1897,9 @@ getDeploymentTargetFromEnvironmentVariables(const Driver &TheDriver,
const llvm::Triple &Triple) {
std::string Targets[Darwin::LastDarwinPlatform + 1];
const char *EnvVars[] = {
- "MACOSX_DEPLOYMENT_TARGET",
- "IPHONEOS_DEPLOYMENT_TARGET",
- "TVOS_DEPLOYMENT_TARGET",
- "WATCHOS_DEPLOYMENT_TARGET",
- "DRIVERKIT_DEPLOYMENT_TARGET",
- "XROS_DEPLOYMENT_TARGET"
- };
+ "MACOSX_DEPLOYMENT_TARGET", "IPHONEOS_DEPLOYMENT_TARGET",
+ "TVOS_DEPLOYMENT_TARGET", "WATCHOS_DEPLOYMENT_TARGET",
+ "DRIVERKIT_DEPLOYMENT_TARGET", "XROS_DEPLOYMENT_TARGET"};
static_assert(std::size(EnvVars) == Darwin::LastDarwinPlatform + 1,
"Missing platform");
for (const auto &I : llvm::enumerate(llvm::ArrayRef(EnvVars))) {
|
ping |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
No description provided.