Commit 0565e65a authored by Nico Weber's avatar Nico Weber
Browse files

[clang/test] Correctly specify simulator env in target flag in fsanitize.c

Putting "simulator" in the `-target` flag requires putting it in the
"environment" part of the triple, which is the 4th `-`-separated component.

Some places in the tests currently use "iossimulator" which puts it in the
OS field. The triple parsing code in llvm::Triple uses startswith("ios")
in parseOS(), so that successfully sets the OS to "iOS", and all these
triples use an intel arch, and iOS + intel triple implicitly make the
driver convert the environment to "simulator", so this happened to work --
but it led to the somewhat strange "simulator-simulator" in the diag
in the test.

No behavior change.

Differential Revision: https://reviews.llvm.org/D132399
parent cd24120c
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment