]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Add “--nocpp2” option to misc/performance
authorJoel Rosdahl <joel@rosdahl.net>
Wed, 1 Jan 2020 20:49:11 +0000 (21:49 +0100)
committerJoel Rosdahl <joel@rosdahl.net>
Sun, 5 Jan 2020 19:18:19 +0000 (20:18 +0100)
(cherry picked from commit dbf7e85f67cf785636341ce07380e7151b582ee6)

misc/performance

index 35c5871c356a68d0a69935aaea0fa048d36896a9..0283933fbadb50d80587863d1c734536fdae5770 100755 (executable)
@@ -1,6 +1,6 @@
 #! /usr/bin/env python3
 #
-# Copyright (C) 2010-2019 Joel Rosdahl and other contributors
+# Copyright (C) 2010-2020 Joel Rosdahl and other contributors
 #
 # See doc/AUTHORS.adoc for a complete list of contributors.
 #
@@ -107,7 +107,9 @@ def test(tmp_dir, options, compiler_args, source_file):
         environment["CCACHE_HARDLINK"] = "1"
     if options.no_compression:
         environment["CCACHE_NOCOMPRESS"] = "1"
-    if options.nostats:
+    if options.no_cpp2:
+        environment["CCACHE_NOCPP2"] = "1"
+    if options.no_stats:
         environment["CCACHE_NOSTATS"] = "1"
 
     results = []
@@ -282,6 +284,9 @@ def main(argv):
         ),
         type="int",
     )
+    op.add_option(
+        "--nocpp2", help="compile preprocessed output", action="store_true"
+    )
     op.add_option(
         "--nostats", help="don't write statistics", action="store_true"
     )
@@ -332,7 +337,8 @@ def main(argv):
         print("Compression level:", options.compression_level or "default")
         print("File cloning:", on_off(options.file_clone))
         print("Hard linking:", on_off(options.hardlink))
-        print("Nostats:", on_off(options.nostats))
+        print("No cpp2:", on_off(options.no_cpp2))
+        print("No stats:", on_off(options.no_stats))
 
     tmp_dir = "%s/perfdir.%d" % (abspath(options.directory), getpid())
     recreate_dir(tmp_dir)