summaryrefslogtreecommitdiff
path: root/components/cplusplus
diff options
context:
space:
mode:
authorMeco Man <[email protected]>2021-12-29 14:14:07 -0500
committerMeco Man <[email protected]>2021-12-29 14:15:38 -0500
commit5187d75af538d9ae268e7d4d31dd412f20d0a63d (patch)
tree953af30a8faeb298e945b30eb761eb25c967da67 /components/cplusplus
parentead24644f008232f81e0408bfb15e99deff115bb (diff)
[armclang] 使用__clang__代替__CLANG_ARM
Diffstat (limited to 'components/cplusplus')
-rw-r--r--components/cplusplus/cxx_crt_init.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/cplusplus/cxx_crt_init.c b/components/cplusplus/cxx_crt_init.c
index 977dee6ee9..46946089ff 100644
--- a/components/cplusplus/cxx_crt_init.c
+++ b/components/cplusplus/cxx_crt_init.c
@@ -13,7 +13,7 @@
#include <rtthread.h>
-#if defined(__CC_ARM) || defined(__CLANG_ARM)
+#if defined(__ARMCC_VERSION)
extern void $Super$$__cpp_initialize__aeabi_(void);
/* we need to change the cpp_initialize order */
RT_WEAK void $Sub$$__cpp_initialize__aeabi_(void)
@@ -36,7 +36,7 @@ RT_WEAK void *__dso_handle = 0;
RT_WEAK int cplusplus_system_init(void)
{
-#if defined(__CC_ARM) || defined(__CLANG_ARM)
+#if defined(__ARMCC_VERSION)
/* If there is no SHT$$INIT_ARRAY, calling
* $Super$$__cpp_initialize__aeabi_() will cause fault. At least until Keil5.12
* the problem still exists. So we have to initialize the C++ runtime by ourself.