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 "")
|
||||
|
||||
if(${mbed_toolchain} STREQUAL "GCC_ARM")
|
||||
list(APPEND c_compile_options
|
||||
list(APPEND profile_c_compile_options
|
||||
"-c"
|
||||
"-Og"
|
||||
)
|
||||
target_compile_options(${target}
|
||||
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"
|
||||
"-fno-rtti"
|
||||
"-Wvla"
|
||||
|
@ -23,16 +23,16 @@ function(mbed_set_profile_options target mbed_toolchain)
|
|||
)
|
||||
target_compile_options(${target}
|
||||
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"
|
||||
"-x" "assembler-with-cpp"
|
||||
)
|
||||
target_compile_options(${target}
|
||||
INTERFACE
|
||||
$<$<COMPILE_LANGUAGE:ASM>:${asm_compile_options}>
|
||||
$<$<COMPILE_LANGUAGE:ASM>:${profile_asm_compile_options}>
|
||||
)
|
||||
|
||||
list(APPEND profile_link_options
|
||||
|
@ -48,22 +48,22 @@ function(mbed_set_profile_options target mbed_toolchain)
|
|||
"-Wl,-n"
|
||||
)
|
||||
elseif(${mbed_toolchain} STREQUAL "ARM")
|
||||
list(APPEND c_compile_options
|
||||
list(APPEND profile_c_compile_options
|
||||
"-O1"
|
||||
)
|
||||
target_compile_options(${target}
|
||||
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-c++-static-destructors"
|
||||
"-O1"
|
||||
)
|
||||
target_compile_options(${target}
|
||||
INTERFACE
|
||||
$<$<COMPILE_LANGUAGE:CXX>:${cxx_compile_options}>
|
||||
$<$<COMPILE_LANGUAGE:CXX>:${profile_cxx_compile_options}>
|
||||
)
|
||||
|
||||
list(APPEND link_options
|
||||
|
|
|
@ -6,31 +6,31 @@ function(mbed_set_profile_options target mbed_toolchain)
|
|||
set(profile_link_options "")
|
||||
|
||||
if(${mbed_toolchain} STREQUAL "GCC_ARM")
|
||||
list(APPEND c_compile_options
|
||||
list(APPEND profile_c_compile_options
|
||||
"-c"
|
||||
"-Os"
|
||||
)
|
||||
target_compile_options(${target}
|
||||
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"
|
||||
"-Wvla"
|
||||
"-Os"
|
||||
)
|
||||
target_compile_options(${target}
|
||||
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"
|
||||
)
|
||||
target_compile_options(${target}
|
||||
INTERFACE
|
||||
$<$<COMPILE_LANGUAGE:ASM>:${asm_compile_options}>
|
||||
$<$<COMPILE_LANGUAGE:ASM>:${profile_asm_compile_options}>
|
||||
)
|
||||
|
||||
list(APPEND profile_link_options
|
||||
|
@ -46,22 +46,22 @@ function(mbed_set_profile_options target mbed_toolchain)
|
|||
"-Wl,-n"
|
||||
)
|
||||
elseif(${mbed_toolchain} STREQUAL "ARM")
|
||||
list(APPEND c_compile_options
|
||||
list(APPEND profile_c_compile_options
|
||||
"-Os"
|
||||
)
|
||||
target_compile_options(${target}
|
||||
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-c++-static-destructors"
|
||||
"-Os"
|
||||
)
|
||||
target_compile_options(${target}
|
||||
INTERFACE
|
||||
$<$<COMPILE_LANGUAGE:CXX>:${cxx_compile_options}>
|
||||
$<$<COMPILE_LANGUAGE:CXX>:${profile_cxx_compile_options}>
|
||||
)
|
||||
|
||||
list(APPEND profile_link_options
|
||||
|
|
|
@ -6,16 +6,16 @@ function(mbed_set_profile_options target mbed_toolchain)
|
|||
set(profile_link_options "")
|
||||
|
||||
if(${mbed_toolchain} STREQUAL "GCC_ARM")
|
||||
list(APPEND c_compile_options
|
||||
list(APPEND profile_c_compile_options
|
||||
"-c"
|
||||
"-Os"
|
||||
)
|
||||
target_compile_options(${target}
|
||||
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"
|
||||
"-fno-rtti"
|
||||
"-Wvla"
|
||||
|
@ -23,16 +23,16 @@ function(mbed_set_profile_options target mbed_toolchain)
|
|||
)
|
||||
target_compile_options(${target}
|
||||
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"
|
||||
"-x" "assembler-with-cpp"
|
||||
)
|
||||
target_compile_options(${target}
|
||||
INTERFACE
|
||||
$<$<COMPILE_LANGUAGE:ASM>:${asm_compile_options}>
|
||||
$<$<COMPILE_LANGUAGE:ASM>:${profile_asm_compile_options}>
|
||||
)
|
||||
|
||||
list(APPEND profile_link_options
|
||||
|
@ -48,22 +48,22 @@ function(mbed_set_profile_options target mbed_toolchain)
|
|||
"-Wl,-n"
|
||||
)
|
||||
elseif(${mbed_toolchain} STREQUAL "ARM")
|
||||
list(APPEND c_compile_options
|
||||
list(APPEND profile_c_compile_options
|
||||
"-Oz"
|
||||
)
|
||||
target_compile_options(${target}
|
||||
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-c++-static-destructors"
|
||||
"-Oz"
|
||||
)
|
||||
target_compile_options(${target}
|
||||
INTERFACE
|
||||
$<$<COMPILE_LANGUAGE:CXX>:${cxx_compile_options}>
|
||||
$<$<COMPILE_LANGUAGE:CXX>:${profile_cxx_compile_options}>
|
||||
)
|
||||
|
||||
list(APPEND profile_link_options
|
||||
|
|
Loading…
Reference in New Issue