Author: Jan Svoboda
Date: 2021-03-27T17:24:03+01:00
New Revision: bb88a5aeee6839caf2f09cd025099d63c15bfb11

URL: 
https://github.com/llvm/llvm-project/commit/bb88a5aeee6839caf2f09cd025099d63c15bfb11
DIFF: 
https://github.com/llvm/llvm-project/commit/bb88a5aeee6839caf2f09cd025099d63c15bfb11.diff

LOG: [clang][cli] Round-trip cc1 arguments in assert builds

This patch enables cc1 argument round-trip for assert builds. It can be 
disabled by building clang with `-DCLANG_ROUND_TRIP_CC1_ARGS=OFF`.

This will be committed only if we reach consensus in 
https://lists.llvm.org/pipermail/cfe-dev/2021-February/067714.html.

Reviewed By: dexonsmith

Differential Revision: https://reviews.llvm.org/D97462

Added: 
    

Modified: 
    clang/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/clang/CMakeLists.txt b/clang/CMakeLists.txt
index e4d5dd77c69a..95cdbd8f6663 100644
--- a/clang/CMakeLists.txt
+++ b/clang/CMakeLists.txt
@@ -467,7 +467,8 @@ option(CLANG_ENABLE_STATIC_ANALYZER
 
 option(CLANG_ENABLE_PROTO_FUZZER "Build Clang protobuf fuzzer." OFF)
 
-option(CLANG_ROUND_TRIP_CC1_ARGS "Round-trip command line arguments in -cc1." 
OFF)
+option(CLANG_ROUND_TRIP_CC1_ARGS
+  "Round-trip command line arguments in -cc1." ${LLVM_ENABLE_ASSERTIONS})
 
 if(NOT CLANG_ENABLE_STATIC_ANALYZER AND CLANG_ENABLE_ARCMT)
   message(FATAL_ERROR "Cannot disable static analyzer while enabling ARCMT or 
Z3")


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to