[clang] [clang][Driver] Add support for XROS_DEPLOYMENT_TARGET env var (PR #81011)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 7 10:44:34 PST 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
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
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
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))) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/81011
More information about the cfe-commits
mailing list