ir2obj: also ignore the -lib cmdline flag for hashing

This commit is contained in:
Johan Engelen 2016-10-06 11:46:31 +02:00
parent 8787c4bc40
commit 88439535d5
2 changed files with 4 additions and 0 deletions

View file

@ -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;

View file

@ -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