[clang] Fix diagnostics-dsym.test on mac-arm64 (PR #99399)

via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 18 15:05:42 PDT 2024


zeroomega wrote:

> Thank you @zeroomega ! I am also running on arm64-mac and that test is passing. What is your `cmake` invocation? I'd like to dig into the underlying cause of non-stable ordering. It looks like the darwin-aarch64 is passing the test as well https://lab.llvm.org/buildbot/#/builders/190 In general, though, I'm not too worried about the ordering of diagnostics so maybe a `CHECK-DAG` would make the test resilient

Our build is a bit complicated to setup since we use a clang (near tip of the tree) which linked to llvm-libcxx, as the host toolchain. But when I try to the the toolchain came with the xcode, the original test file passed, and after I swapped the ordering, it failed. So apparently the output ordering is a bit non-deterministic. And since `bar` is used later than `foo`, so natually `foo` should comes first and `bar` comes later. My guess is that underlying data structure for the symbols is probably using a C++ standard library and it has different implementation from libcxx and whatever was provided by xcode. 

Let me test the `CHECK-DAG` solution locally and update my patch. I think that is a better solution.

https://github.com/llvm/llvm-project/pull/99399


More information about the cfe-commits mailing list