代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/clang 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 752af60afc7fd9cc986adf280d4d03714228fb04 Mon Sep 17 00:00:00 2001
From: liyunfei <liyunfei33@huawei.com>
Date: Tue, 16 Jan 2024 14:47:02 +0800
Subject: [PATCH] add BUILD_FOR_OPENEULER build option to clang
---
clang/CMakeLists.txt | 5 +++++
clang/include/clang/Driver/CMakeLists.txt | 4 ++++
2 files changed, 9 insertions(+)
diff --git a/clang/CMakeLists.txt b/clang/CMakeLists.txt
index f7936d72e088..d558b0522e82 100644
--- a/clang/CMakeLists.txt
+++ b/clang/CMakeLists.txt
@@ -317,6 +317,11 @@ if (LLVM_COMPILER_IS_GCC_COMPATIBLE)
endif()
endif ()
+option(BUILD_FOR_OPENEULER "Add gcc compatible options for openEuler toolchain" OFF)
+if (BUILD_FOR_OPENEULER)
+ add_definitions( -DBUILD_FOR_OPENEULER )
+endif()
+
# Determine HOST_LINK_VERSION on Darwin.
set(HOST_LINK_VERSION)
if (APPLE AND NOT CMAKE_LINKER MATCHES ".*lld.*")
diff --git a/clang/include/clang/Driver/CMakeLists.txt b/clang/include/clang/Driver/CMakeLists.txt
index a9d988047920..ea55ba0f1f27 100644
--- a/clang/include/clang/Driver/CMakeLists.txt
+++ b/clang/include/clang/Driver/CMakeLists.txt
@@ -1,3 +1,7 @@
set(LLVM_TARGET_DEFINITIONS Options.td)
+if (BUILD_FOR_OPENEULER)
+tablegen(LLVM Options.inc -gen-opt-parser-defs -DBUILD_FOR_OPENEULER)
+else()
tablegen(LLVM Options.inc -gen-opt-parser-defs)
+endif()
add_public_tablegen_target(ClangDriverOptions)
--
Gitee
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。