Commit Graph

3 Commits

Author SHA1 Message Date
Fangrui Song 6e09722b27 [test] Use %t instead of %T to remove race conditions between config-file3.c and target-override.c
Both tests operate on `%T/testbin`. If the two tests run concurrently,
one may fail.

This is likely the root cause of flaky failures reported by
https://lists.llvm.org/pipermail/llvm-dev/2020-September/144781.html

https://llvm.org/docs/CommandGuide/lit.html says:

`%T	parent directory of %t (not unique, deprecated, do not use)`

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D87103
2020-09-03 12:28:53 -07:00
Nico Weber ccabe93298 clang: Make tests using symlinks more consistent.
Instead of checking if each symlink exists before removing it,
remove the whole temp dir housing the symlinks before recreating it.
This is a bit shorter, conceptually simpler (in that the first
and consecutive test runs have more similar behavior), it's what we're
already doing in almost all places where we do it, and it works if the
symlink exists but is a dead link (e.g. when it points into the build
dir but the build dir is renamed).

No intended behavior change.
2020-04-05 12:56:41 -04:00
Serge Pavlov 3b7d381169 Put target deduced from executable name at the start of argument list
When clang is called as 'target-clang', put deduced target option at
the start of argument list so that option '--target=' specified in command
line could override it.

This change fixes PR34671.

llvm-svn: 313760
2017-09-20 15:22:27 +00:00