On a hybrid CPU system (e.g. Intel with performance and efficient
cores), -march=native expansion can be different on different core types
and thus fail the "-march=native, no CWD in input hash" test if the
first and second compilation end up on different core types. Fix this by
just verifying that CWD doesn't appear in the expansion.
# -------------------------------------------------------------------------
if $COMPILER -march=native -c test1.c 2>/dev/null; then
TEST "-march=native, no CWD in input hash"
# -------------------------------------------------------------------------
if $COMPILER -march=native -c test1.c 2>/dev/null; then
TEST "-march=native, no CWD in input hash"
- mkdir a b
- cp test1.c a
- cp test1.c b
- cd a
- $CCACHE_COMPILE -march=native -c test1.c
- expect_stat preprocessed_cache_hit 0
- expect_stat cache_miss 1
- cd ../b
- $CCACHE_COMPILE -march=native -c test1.c
- cd ..
- expect_stat preprocessed_cache_hit 1
- expect_stat cache_miss 1
+ CCACHE_DEBUG=1 $CCACHE_COMPILE -march=native -c test1.c
+ expect_not_contains test1.o.*.ccache-input-text "$PWD"
fi
# -------------------------------------------------------------------------
fi
# -------------------------------------------------------------------------