[pkg-d-commits] [ldc] 60/211: ir2obj: also ignore the `-lib` cmdline flag for hashing

Matthias Klumpp mak at moszumanska.debian.org
Sun Apr 23 22:36:10 UTC 2017


This is an automated email from the git hooks/post-receive script.

mak pushed a commit to annotated tag v1.1.0
in repository ldc.

commit 88439535d5d37e1ff4550cde90effaa2ef5176a7
Author: Johan Engelen <jbc.engelen at gmail.com>
Date:   Thu Oct 6 11:46:31 2016 +0200

    ir2obj: also ignore the `-lib` cmdline flag for hashing
---
 driver/ir2obj_cache.cpp               | 3 +++
 tests/linking/ir2obj_caching_flags1.d | 1 +
 2 files changed, 4 insertions(+)

diff --git a/driver/ir2obj_cache.cpp b/driver/ir2obj_cache.cpp
index 3949bba..a84f4de 100644
--- a/driver/ir2obj_cache.cpp
+++ b/driver/ir2obj_cache.cpp
@@ -183,6 +183,9 @@ void outputIR2ObjRelevantCmdlineArgs(llvm::raw_ostream &hash_os)
       // All  "-ir2..." options can be ignored
       if (arg[1] == 'i' && arg[2] == 'r' && arg[3] == '2')
         continue;
+      // Ignore "-lib"
+      if (arg[1] == 'l' && arg[2] == 'i' && arg[3] == 'b' && !arg[4])
+        continue;
       // All effects of -d-version... are already included in the IR hash.
       if (strncmp(arg+1, "d-version", 9) == 0)
         continue;
diff --git a/tests/linking/ir2obj_caching_flags1.d b/tests/linking/ir2obj_caching_flags1.d
index 4db51c5..06022fb 100644
--- a/tests/linking/ir2obj_caching_flags1.d
+++ b/tests/linking/ir2obj_caching_flags1.d
@@ -29,6 +29,7 @@
 // RUN:   && %ldc %s -c -of=%t%obj -ir2obj-cache=%T/flag1cache -D -H -I. -J.                    -vv | FileCheck --check-prefix=MUST_HIT %s \
 // RUN:   && %ldc %s -c -of=%t%obj -ir2obj-cache=%T/flag1cache -d-version=Irrelevant            -vv | FileCheck --check-prefix=MUST_HIT %s \
 // RUN:   && %ldc %s -c -of=%t%obj -ir2obj-cache=%T/flag1cache -unittest                        -vv | FileCheck --check-prefix=MUST_HIT %s \
+// RUN:   && %ldc %s               -ir2obj-cache=%T/flag1cache -lib                             -vv | FileCheck --check-prefix=MUST_HIT %s \
 // RUN:   && %ldc                  -ir2obj-cache=%T/flag1cache -vv -run %s                          | FileCheck --check-prefix=COULD_HIT %s \
 // RUN:   && %ldc                  -ir2obj-cache=%T/flag1cache -vv -run %s a b                      | FileCheck --check-prefix=MUST_HIT %s \
 // RUN:   && %ldc %s -c -of=%t%obj -ir2obj-cache=%T/flag1cache -g                               -vv | FileCheck --check-prefix=MUST_HIT %s

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-d/ldc.git



More information about the pkg-d-commits mailing list