[PATCH] D50548: [CMake] Don't parse target triple except for arch
Matt Morehouse via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 13 09:30:18 PDT 2018
morehouse added inline comments.
================
Comment at: compiler-rt/cmake/Modules/CompilerRTUtils.cmake:98
+ if(NOT ${length} EQUAL -1)
+ math(EXPR end "${begin}+${length}")
+ else()
----------------
Should this be `begin + length - 1` since the foreach loop includes `end` in its range?
================
Comment at: compiler-rt/cmake/Modules/CompilerRTUtils.cmake:106
+ list(APPEND sublist ${component})
+ endif()
+ endforeach()
----------------
Maybe `break()` after the first index that's too large?
================
Comment at: compiler-rt/cmake/Modules/CompilerRTUtils.cmake:339
+ string(REPLACE "-" ";" triple_list ${COMPILER_RT_DEFAULT_TARGET_TRIPLE})
+ list_sublist(triple_list 1 -1 triple_sublist)
+ string(REPLACE ";" "-" os_abi "${triple_sublist}")
----------------
Do we need to implement `list_sublist` if this is the only use of it? Maybe removing the first element from `triple_list` would be simpler.
Repository:
rCRT Compiler Runtime
https://reviews.llvm.org/D50548
More information about the llvm-commits
mailing list