6 Commits

Author SHA1 Message Date
Fangrui Song
5c29ffda90 Revert "[Driver][test] Replace ^//$ with empty string"
This reverts commit 4817b7729a1846b709ec02b98bfe11b0125f8e8f.

It caused some `^/\n` and had some objection about its readability improvement.
2022-06-24 13:52:27 -07:00
Fangrui Song
4817b7729a [Driver][test] Replace ^//$ with empty string
The convention does not add //\n. Having all RUN/CHECK lines separated by //\n
makes editor movement difficult (e.g. { } in Vim).
2022-06-24 11:25:03 -07:00
Jan Svoboda
9ec7e4df57 [clang][driver] NFC, test: Make test output order-independent 2022-06-23 17:15:28 +02:00
Jan Svoboda
92c6ffa14c [clang][driver] Ensure we don't accumulate entries in -MJ files
Previously, each job would overwrite the -MJ file. This didn't quite work for Clang invocations with multiple architectures, which got fixed in D121997 by always appending to the -MJ file. That's not correct either, since the file would grow indefinitely on subsequent Clang invocations. This patch ensures the driver always removes the file before jobs fill it in by appending.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D128098
2022-06-18 00:00:43 +02:00
Jan Svoboda
2de36d0369 [clang][driver] Only run multi-arch tests on Darwin
This fixes the test introduced in a85670001ba2487988839656299771915ebc7633 that causes failures on non-Darwin systems.
2022-06-13 14:03:23 +02:00
Jan Svoboda
a85670001b [clang][driver] Fix compilation database dump with multiple architectures
Command lines with multiple `-arch` arguments expand into multiple entries in the compilation database. However, the file writes are not appending, meaning subsequent writes end up overwriting the previous ones, resulting in garbled output.

This patch fixes that by always appending to the file.

rdar://90165004

Reviewed By: dexonsmith

Differential Revision: https://reviews.llvm.org/D121997
2022-06-13 13:30:57 +02:00