mirror of https://github.com/ARMmbed/mbed-os.git
Fix variable name conflict with toolchain file
parent
423e8b0324
commit
f07c0cd7e6
|
@ -6,16 +6,16 @@ function(mbed_set_profile_options target mbed_toolchain)
|
||||||
set(profile_link_options "")
|
set(profile_link_options "")
|
||||||
|
|
||||||
if(${mbed_toolchain} STREQUAL "GCC_ARM")
|
if(${mbed_toolchain} STREQUAL "GCC_ARM")
|
||||||
list(APPEND c_compile_options
|
list(APPEND profile_c_compile_options
|
||||||
"-c"
|
"-c"
|
||||||
"-Og"
|
"-Og"
|
||||||
)
|
)
|
||||||
target_compile_options(${target}
|
target_compile_options(${target}
|
||||||
INTERFACE
|
INTERFACE
|
||||||
$<$<COMPILE_LANGUAGE:C>:${c_compile_options}>
|
$<$<COMPILE_LANGUAGE:C>:${profile_c_compile_options}>
|
||||||
)
|
)
|
||||||
|
|
||||||
list(APPEND cxx_compile_options
|
list(APPEND profile_cxx_compile_options
|
||||||
"-c"
|
"-c"
|
||||||
"-fno-rtti"
|
"-fno-rtti"
|
||||||
"-Wvla"
|
"-Wvla"
|
||||||
|
@ -23,16 +23,16 @@ function(mbed_set_profile_options target mbed_toolchain)
|
||||||
)
|
)
|
||||||
target_compile_options(${target}
|
target_compile_options(${target}
|
||||||
INTERFACE
|
INTERFACE
|
||||||
$<$<COMPILE_LANGUAGE:CXX>:${cxx_compile_options}>
|
$<$<COMPILE_LANGUAGE:CXX>:${profile_cxx_compile_options}>
|
||||||
)
|
)
|
||||||
|
|
||||||
list(APPEND asm_compile_options
|
list(APPEND profile_asm_compile_options
|
||||||
"-c"
|
"-c"
|
||||||
"-x" "assembler-with-cpp"
|
"-x" "assembler-with-cpp"
|
||||||
)
|
)
|
||||||
target_compile_options(${target}
|
target_compile_options(${target}
|
||||||
INTERFACE
|
INTERFACE
|
||||||
$<$<COMPILE_LANGUAGE:ASM>:${asm_compile_options}>
|
$<$<COMPILE_LANGUAGE:ASM>:${profile_asm_compile_options}>
|
||||||
)
|
)
|
||||||
|
|
||||||
list(APPEND profile_link_options
|
list(APPEND profile_link_options
|
||||||
|
@ -48,22 +48,22 @@ function(mbed_set_profile_options target mbed_toolchain)
|
||||||
"-Wl,-n"
|
"-Wl,-n"
|
||||||
)
|
)
|
||||||
elseif(${mbed_toolchain} STREQUAL "ARM")
|
elseif(${mbed_toolchain} STREQUAL "ARM")
|
||||||
list(APPEND c_compile_options
|
list(APPEND profile_c_compile_options
|
||||||
"-O1"
|
"-O1"
|
||||||
)
|
)
|
||||||
target_compile_options(${target}
|
target_compile_options(${target}
|
||||||
INTERFACE
|
INTERFACE
|
||||||
$<$<COMPILE_LANGUAGE:C>:${c_compile_options}>
|
$<$<COMPILE_LANGUAGE:C>:${profile_c_compile_options}>
|
||||||
)
|
)
|
||||||
|
|
||||||
list(APPEND cxx_compile_options
|
list(APPEND profile_cxx_compile_options
|
||||||
"-fno-rtti"
|
"-fno-rtti"
|
||||||
"-fno-c++-static-destructors"
|
"-fno-c++-static-destructors"
|
||||||
"-O1"
|
"-O1"
|
||||||
)
|
)
|
||||||
target_compile_options(${target}
|
target_compile_options(${target}
|
||||||
INTERFACE
|
INTERFACE
|
||||||
$<$<COMPILE_LANGUAGE:CXX>:${cxx_compile_options}>
|
$<$<COMPILE_LANGUAGE:CXX>:${profile_cxx_compile_options}>
|
||||||
)
|
)
|
||||||
|
|
||||||
list(APPEND link_options
|
list(APPEND link_options
|
||||||
|
|
|
@ -6,31 +6,31 @@ function(mbed_set_profile_options target mbed_toolchain)
|
||||||
set(profile_link_options "")
|
set(profile_link_options "")
|
||||||
|
|
||||||
if(${mbed_toolchain} STREQUAL "GCC_ARM")
|
if(${mbed_toolchain} STREQUAL "GCC_ARM")
|
||||||
list(APPEND c_compile_options
|
list(APPEND profile_c_compile_options
|
||||||
"-c"
|
"-c"
|
||||||
"-Os"
|
"-Os"
|
||||||
)
|
)
|
||||||
target_compile_options(${target}
|
target_compile_options(${target}
|
||||||
INTERFACE
|
INTERFACE
|
||||||
$<$<COMPILE_LANGUAGE:C>:${c_compile_options}>
|
$<$<COMPILE_LANGUAGE:C>:${profile_c_compile_options}>
|
||||||
)
|
)
|
||||||
|
|
||||||
list(APPEND cxx_compile_options
|
list(APPEND profile_cxx_compile_options
|
||||||
"-fno-rtti"
|
"-fno-rtti"
|
||||||
"-Wvla"
|
"-Wvla"
|
||||||
"-Os"
|
"-Os"
|
||||||
)
|
)
|
||||||
target_compile_options(${target}
|
target_compile_options(${target}
|
||||||
INTERFACE
|
INTERFACE
|
||||||
$<$<COMPILE_LANGUAGE:CXX>:${cxx_compile_options}>
|
$<$<COMPILE_LANGUAGE:CXX>:${profile_cxx_compile_options}>
|
||||||
)
|
)
|
||||||
|
|
||||||
list(APPEND asm_compile_options
|
list(APPEND profile_asm_compile_options
|
||||||
"-x" "assembler-with-cpp"
|
"-x" "assembler-with-cpp"
|
||||||
)
|
)
|
||||||
target_compile_options(${target}
|
target_compile_options(${target}
|
||||||
INTERFACE
|
INTERFACE
|
||||||
$<$<COMPILE_LANGUAGE:ASM>:${asm_compile_options}>
|
$<$<COMPILE_LANGUAGE:ASM>:${profile_asm_compile_options}>
|
||||||
)
|
)
|
||||||
|
|
||||||
list(APPEND profile_link_options
|
list(APPEND profile_link_options
|
||||||
|
@ -46,22 +46,22 @@ function(mbed_set_profile_options target mbed_toolchain)
|
||||||
"-Wl,-n"
|
"-Wl,-n"
|
||||||
)
|
)
|
||||||
elseif(${mbed_toolchain} STREQUAL "ARM")
|
elseif(${mbed_toolchain} STREQUAL "ARM")
|
||||||
list(APPEND c_compile_options
|
list(APPEND profile_c_compile_options
|
||||||
"-Os"
|
"-Os"
|
||||||
)
|
)
|
||||||
target_compile_options(${target}
|
target_compile_options(${target}
|
||||||
INTERFACE
|
INTERFACE
|
||||||
$<$<COMPILE_LANGUAGE:C>:${c_compile_options}>
|
$<$<COMPILE_LANGUAGE:C>:${profile_c_compile_options}>
|
||||||
)
|
)
|
||||||
|
|
||||||
list(APPEND cxx_compile_options
|
list(APPEND profile_cxx_compile_options
|
||||||
"-fno-rtti"
|
"-fno-rtti"
|
||||||
"-fno-c++-static-destructors"
|
"-fno-c++-static-destructors"
|
||||||
"-Os"
|
"-Os"
|
||||||
)
|
)
|
||||||
target_compile_options(${target}
|
target_compile_options(${target}
|
||||||
INTERFACE
|
INTERFACE
|
||||||
$<$<COMPILE_LANGUAGE:CXX>:${cxx_compile_options}>
|
$<$<COMPILE_LANGUAGE:CXX>:${profile_cxx_compile_options}>
|
||||||
)
|
)
|
||||||
|
|
||||||
list(APPEND profile_link_options
|
list(APPEND profile_link_options
|
||||||
|
|
|
@ -6,16 +6,16 @@ function(mbed_set_profile_options target mbed_toolchain)
|
||||||
set(profile_link_options "")
|
set(profile_link_options "")
|
||||||
|
|
||||||
if(${mbed_toolchain} STREQUAL "GCC_ARM")
|
if(${mbed_toolchain} STREQUAL "GCC_ARM")
|
||||||
list(APPEND c_compile_options
|
list(APPEND profile_c_compile_options
|
||||||
"-c"
|
"-c"
|
||||||
"-Os"
|
"-Os"
|
||||||
)
|
)
|
||||||
target_compile_options(${target}
|
target_compile_options(${target}
|
||||||
INTERFACE
|
INTERFACE
|
||||||
$<$<COMPILE_LANGUAGE:C>:${c_compile_options}>
|
$<$<COMPILE_LANGUAGE:C>:${profile_c_compile_options}>
|
||||||
)
|
)
|
||||||
|
|
||||||
list(APPEND cxx_compile_options
|
list(APPEND profile_cxx_compile_options
|
||||||
"-c"
|
"-c"
|
||||||
"-fno-rtti"
|
"-fno-rtti"
|
||||||
"-Wvla"
|
"-Wvla"
|
||||||
|
@ -23,16 +23,16 @@ function(mbed_set_profile_options target mbed_toolchain)
|
||||||
)
|
)
|
||||||
target_compile_options(${target}
|
target_compile_options(${target}
|
||||||
INTERFACE
|
INTERFACE
|
||||||
$<$<COMPILE_LANGUAGE:CXX>:${cxx_compile_options}>
|
$<$<COMPILE_LANGUAGE:CXX>:${profile_cxx_compile_options}>
|
||||||
)
|
)
|
||||||
|
|
||||||
list(APPEND asm_compile_options
|
list(APPEND profile_asm_compile_options
|
||||||
"-c"
|
"-c"
|
||||||
"-x" "assembler-with-cpp"
|
"-x" "assembler-with-cpp"
|
||||||
)
|
)
|
||||||
target_compile_options(${target}
|
target_compile_options(${target}
|
||||||
INTERFACE
|
INTERFACE
|
||||||
$<$<COMPILE_LANGUAGE:ASM>:${asm_compile_options}>
|
$<$<COMPILE_LANGUAGE:ASM>:${profile_asm_compile_options}>
|
||||||
)
|
)
|
||||||
|
|
||||||
list(APPEND profile_link_options
|
list(APPEND profile_link_options
|
||||||
|
@ -48,22 +48,22 @@ function(mbed_set_profile_options target mbed_toolchain)
|
||||||
"-Wl,-n"
|
"-Wl,-n"
|
||||||
)
|
)
|
||||||
elseif(${mbed_toolchain} STREQUAL "ARM")
|
elseif(${mbed_toolchain} STREQUAL "ARM")
|
||||||
list(APPEND c_compile_options
|
list(APPEND profile_c_compile_options
|
||||||
"-Oz"
|
"-Oz"
|
||||||
)
|
)
|
||||||
target_compile_options(${target}
|
target_compile_options(${target}
|
||||||
INTERFACE
|
INTERFACE
|
||||||
$<$<COMPILE_LANGUAGE:C>:${c_compile_options}>
|
$<$<COMPILE_LANGUAGE:C>:${profile_c_compile_options}>
|
||||||
)
|
)
|
||||||
|
|
||||||
list(APPEND cxx_compile_options
|
list(APPEND profile_cxx_compile_options
|
||||||
"-fno-rtti"
|
"-fno-rtti"
|
||||||
"-fno-c++-static-destructors"
|
"-fno-c++-static-destructors"
|
||||||
"-Oz"
|
"-Oz"
|
||||||
)
|
)
|
||||||
target_compile_options(${target}
|
target_compile_options(${target}
|
||||||
INTERFACE
|
INTERFACE
|
||||||
$<$<COMPILE_LANGUAGE:CXX>:${cxx_compile_options}>
|
$<$<COMPILE_LANGUAGE:CXX>:${profile_cxx_compile_options}>
|
||||||
)
|
)
|
||||||
|
|
||||||
list(APPEND profile_link_options
|
list(APPEND profile_link_options
|
||||||
|
|
Loading…
Reference in New Issue