[PATCH] D105603: [X86][CET] Support to build LLVM toolchain with CET enabled.

xiongji90 via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 20 00:23:48 PDT 2021


xiongji90 added inline comments.


================
Comment at: llvm/cmake/modules/HandleLLVMOptions.cmake:372
+if(NOT WIN32)
+  if( LLVM_BUILD_CET_ENABLE)
+    add_flag_if_supported("-fcf-protection=full" CET)
----------------
manojgupta wrote:
> I am not an expert in CMake but I think we need to add support for this option per subproject as well since the projects can be built independent of LLVM  e.g. : compiler-rt, libcxx, libcxxbi, libunwind can be built separately without compiling llvm.
> 
Hi, @manojgupta 
Agree on your suggestion. Enabling CET for each subproject one by one should be the correct practice.
I will update the patch to remove adding CET compiling options here, do you think we can keep "LLVM_BUILD_CET_ENABLE" here? When all subprojects have been enabled CET building, we can use this option to build whole llvm toolchain with CET enabled.
Thanks very much!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D105603/new/

https://reviews.llvm.org/D105603



More information about the llvm-commits mailing list