From 5187d75af538d9ae268e7d4d31dd412f20d0a63d Mon Sep 17 00:00:00 2001 From: Meco Man <920369182@qq.com> Date: Wed, 29 Dec 2021 14:14:07 -0500 Subject: [armclang] 使用__clang__代替__CLANG_ARM MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/utilities/utest/utest.c | 2 +- components/utilities/var_export/var_export.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'components/utilities') diff --git a/components/utilities/utest/utest.c b/components/utilities/utest/utest.c index 7103efb89c..8c8ffd674a 100644 --- a/components/utilities/utest/utest.c +++ b/components/utilities/utest/utest.c @@ -68,7 +68,7 @@ void utest_log_lv_set(rt_uint8_t lv) int utest_init(void) { /* initialize the utest commands table.*/ -#if defined(__CC_ARM) || defined(__CLANG_ARM) /* ARM C Compiler */ +#if defined(__ARMCC_VERSION) /* ARM C Compiler */ extern const int UtestTcTab$$Base; extern const int UtestTcTab$$Limit; tc_table = (utest_tc_export_t)&UtestTcTab$$Base; diff --git a/components/utilities/var_export/var_export.c b/components/utilities/var_export/var_export.c index f4623dec04..1e54f39362 100644 --- a/components/utilities/var_export/var_export.c +++ b/components/utilities/var_export/var_export.c @@ -20,7 +20,7 @@ static rt_size_t ve_exporter_num = 0; #endif /* for ARM C and IAR Compiler */ -#if defined(__CC_ARM) || defined(__CLANG_ARM) || defined (__ICCARM__) || defined(__ICCRX__) +#if defined(__ARMCC_VERSION) || defined (__ICCARM__) || defined(__ICCRX__) static RT_USED const struct ve_exporter __ve_table_start RT_SECTION("0.""VarExpTab") = {"ve_start", "ve_start", 0}; @@ -43,7 +43,7 @@ RT_USED const struct ve_exporter __ve_table_end = { "ve_end", "ve_end", 2}; int var_export_init(void) { /* initialize the var export table.*/ -#if defined(__CC_ARM) || defined(__CLANG_ARM) /* for ARM C Compiler */ +#if defined(__ARMCC_VERSION) /* for ARM C Compiler */ ve_exporter_table = &__ve_table_start + 1; ve_exporter_num = &__ve_table_end - &__ve_table_start; #elif defined (__GNUC__) /* for GCC Compiler */ @@ -94,7 +94,7 @@ int var_export_init(void) } } ve_exporter_table = ve_exporter_tab; -#endif /* __CC_ARM || __CLANG_ARM */ +#endif /* __ARMCC_VERSION */ return ve_exporter_num; } -- cgit v1.3.1