Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clang crashes on "-v --target=powerpc-apple-darwin8 --print-supported-cpus" #47698

Closed
llvmbot opened this issue Dec 2, 2020 · 7 comments
Closed
Labels
bugzilla Issues migrated from bugzilla clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' confirmed Verified by a second party crash-on-valid

Comments

@llvmbot
Copy link
Collaborator

llvmbot commented Dec 2, 2020

Bugzilla Link 48354
Version 11.0
OS Linux
Reporter LLVM Bugzilla Contributor
CC @zygoloid

Extended Description

saga ~ # clang-11 -v --target=powerpc-apple-darwin8 --print-supported-cpus
clang version 11.0.0
Target: powerpc-apple-darwin8
Thread model: posix
InstalledDir: /usr/lib/llvm/11/bin
(in-process)
"/usr/lib/llvm/11/bin/clang-11" -cc1 -triple powerpc-apple-darwin8 -Wundef-prefix=TARGET_OS_ -Werror=undef-prefix -fsyntax-only -disable-free -disable-llvm-verifier -discard-value-names -main-file-name -mrelocation-model pic -pic-level 2 -mframe-pointer=all -fno-rounding-math -munwind-tables -faligned-alloc-unavailable -fcompatibility-qualified-id-block-type-checking -target-cpu ppc -mfloat-abi hard -fno-split-dwarf-inlining -debugger-tuning=lldb -v -resource-dir /usr/lib/llvm/11/bin/../../../../lib/clang/11.0.0 -internal-isystem /usr/local/include -internal-isystem /usr/lib/llvm/11/bin/../../../../lib/clang/11.0.0/include -internal-externc-isystem /usr/include -fdebug-compilation-dir /root -ferror-limit 19 -fblocks -fblocks-runtime-optional -fencode-extended-block-signature -fregister-global-dtors-with-atexit -fgnuc-version=4.2.1 -fmax-type-align=16 -fcolor-diagnostics -faddrsig -x c --print-supported-cpus
LLVM ERROR: Darwin is no longer supported for PowerPC
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: clang-11 -v --target=powerpc-apple-darwin8 --print-supported-cpus
#​0 0x00007fc04c45e30a llvm::sys::PrintStackTrace(llvm::raw_ostream&) /usr/src/debug/sys-devel/llvm-11.0.0/llvm/lib/Support/Unix/Signals.inc:568:3
#​1 0x00007fc04c45c544 llvm::sys::RunSignalHandlers() /usr/src/debug/sys-devel/llvm-11.0.0/llvm/lib/Support/Signals.cpp:68:20
#​2 0x00007fc04c38bad8 HandleCrash /usr/src/debug/sys-devel/llvm-11.0.0/llvm/lib/Support/CrashRecoveryContext.cpp:77:5
#​3 0x00007fc04c38bad8 CrashRecoverySignalHandler /usr/src/debug/sys-devel/llvm-11.0.0/llvm/lib/Support/CrashRecoveryContext.cpp:382:62
#​4 0x00007fc04b4ec2f0 (/lib64/libc.so.6+0x392f0)
#​5 0x00007fc04b4ec271 raise /usr/src/debug/sys-libs/glibc-2.32-r3/glibc-2.32/signal/../sysdeps/unix/sysv/linux/raise.c:50:1
#​6 0x00007fc04b4d5536 abort /usr/src/debug/sys-libs/glibc-2.32-r3/glibc-2.32/stdlib/abort.c:81:7
#​7 0x00007fc04c39b27a llvm::raw_svector_ostream::raw_svector_ostream(llvm::SmallVectorImpl&) /usr/src/debug/sys-devel/llvm-11.0.0/llvm/include/llvm/Support/raw_ostream.h:566:64
#​8 0x00007fc04c39b27a llvm::report_fatal_error(llvm::Twine const&, bool) /usr/src/debug/sys-devel/llvm-11.0.0/llvm/lib/Support/ErrorHandling.cpp:114:34
#​9 0x00007fc04c39b3b5 (/usr/lib/llvm/11/bin/../lib64/libLLVM-11.so+0xa613b5)
#​10 0x00007fc04e6528ac computeTargetABI /usr/src/debug/sys-devel/llvm-11.0.0/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp:202:23
#​11 0x00007fc04e6528ac llvm::PPCTargetMachine::PPCTargetMachine(llvm::Target const&, llvm::Triple const&, llvm::StringRef, llvm::StringRef, llvm::TargetOptions const&, llvm::Optionalllvm::Reloc::Model, llvm::Optionalllvm::CodeModel::Model, llvm::CodeGenOpt::Level, bool) /usr/src/debug/sys-devel/llvm-11.0.0/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp:313:33
#​12 0x00007fc04e652cdc llvm::RegisterTargetMachinellvm::PPCTargetMachine::Allocator(llvm::Target const&, llvm::Triple const&, llvm::StringRef, llvm::StringRef, llvm::TargetOptions const&, llvm::Optionalllvm::Reloc::Model, llvm::Optionalllvm::CodeModel::Model, llvm::CodeGenOpt::Level, bool) /usr/src/debug/sys-devel/llvm-11.0.0/llvm/include/llvm/Support/TargetRegistry.h:1121:12
#​13 0x0000560b32bd21da std::__cxx11::basic_string<char, std::char_traits, std::allocator >::_M_data() const /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/include/g++-v10/bits/basic_string.h:187:28
#​14 0x0000560b32bd21da std::__cxx11::basic_string<char, std::char_traits, std::allocator >::_M_is_local() const /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/include/g++-v10/bits/basic_string.h:222:23
#​15 0x0000560b32bd21da std::__cxx11::basic_string<char, std::char_traits, std::allocator >::_M_dispose() /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/include/g++-v10/bits/basic_string.h:231:18
#​16 0x0000560b32bd21da std::__cxx11::basic_string<char, std::char_traits, std::allocator >::~basic_string() /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/include/g++-v10/bits/basic_string.h:658:19
#​17 0x0000560b32bd21da llvm::Triple::~Triple() /usr/lib/llvm/11/include/llvm/ADT/Triple.h:45:7
#​18 0x0000560b32bd21da llvm::Target::createTargetMachine(llvm::StringRef, llvm::StringRef, llvm::StringRef, llvm::TargetOptions const&, llvm::Optionalllvm::Reloc::Model, llvm::Optionalllvm::CodeModel::Model, llvm::CodeGenOpt::Level, bool) const /usr/lib/llvm/11/include/llvm/Support/TargetRegistry.h:402:39
#​19 0x0000560b32bd21da PrintSupportedCPUs /usr/src/debug/sys-devel/clang-11.0.0/clang/tools/driver/cc1_main.cpp:180:79
#​20 0x0000560b32bd21da cc1_main(llvm::ArrayRef<char const*>, char const*, void*) /usr/src/debug/sys-devel/clang-11.0.0/clang/tools/driver/cc1_main.cpp:215:30
#​21 0x0000560b32bd0117 ExecuteCC1Tool /usr/src/debug/sys-devel/clang-11.0.0/clang/tools/driver/driver.cpp:335:34
#​22 0x00007fc0525d5685 operator() /usr/src/debug/sys-devel/clang-11.0.0/clang/lib/Driver/Job.cpp:400:32
#​23 0x00007fc0525d5685 callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optionalllvm::StringRef >, std::string*, bool*) const::<lambda()> > /usr/lib/llvm/11/include/llvm/ADT/STLExtras.h:185:52
#​24 0x00007fc04c38bbe3 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) /usr/src/debug/sys-devel/llvm-11.0.0/llvm/lib/Support/CrashRecoveryContext.cpp:420:1
#​25 0x00007fc0525d78ce clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optionalllvm::StringRef >, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, bool) const /usr/src/debug/sys-devel/clang-11.0.0/clang/lib/Driver/Job.cpp:404:10
#​26 0x00007fc0525ab559 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&) const /usr/src/debug/sys-devel/clang-11.0.0/clang/lib/Driver/Compilation.cpp:196:3
#​27 0x00007fc0525abab3 clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) const /usr/src/debug/sys-devel/clang-11.0.0/clang/lib/Driver/Compilation.cpp:246:5
#​28 0x00007fc0525b9189 llvm::SmallVectorBase::empty() const /usr/lib/llvm/11/include/llvm/ADT/SmallVector.h:69:47
#​29 0x00007fc0525b9189 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) /usr/src/debug/sys-devel/clang-11.0.0/clang/lib/Driver/Driver.cpp:1509:28
#​30 0x0000560b32bcc599 main /usr/src/debug/sys-devel/clang-11.0.0/clang/tools/driver/driver.cpp:502:39
#​31 0x00007fc04b4d6e0a __libc_start_main /usr/src/debug/sys-libs/glibc-2.32-r3/glibc-2.32/csu/../csu/libc-start.c:314:16
#​32 0x0000560b32bcd5ea _start (/usr/lib/llvm/11/bin/clang-11+0x115ea)
clang-11: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 11.0.0
Target: powerpc-apple-darwin8
Thread model: posix
InstalledDir: /usr/lib/llvm/11/bin
clang-11: note: diagnostic msg: Error generating preprocessed source(s) - ignoring input from stdin.
clang-11: note: diagnostic msg: Error generating preprocessed source(s) - no preprocessable inputs.

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 10, 2021
@Endilll
Copy link
Contributor

Endilll commented Sep 9, 2023

Still crashing as of post-17 trunk: https://godbolt.org/z/oM8W8c6Eh

clang version 18.0.0 (https://github.com/llvm/llvm-project.git 9dc5d8df16030a63deb2a425c6122985b5a06891)
Target: powerpc-apple-darwin8
Thread model: posix
InstalledDir: /opt/compiler-explorer/clang-assertions-trunk/bin

clang++: /root/llvm-project/clang/lib/Driver/ToolChains/Darwin.h:433:
bool clang::driver::toolchains::Darwin::isTargetWatchOSBased() const:
Assertion `TargetInitialized && "Target not initialized!"' failed.

PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: /opt/compiler-explorer/clang-assertions-trunk/bin/clang++ -gdwarf-4 -g -o /app/output.s -mllvm --x86-asm-syntax=intel -S --gcc-toolchain=/opt/compiler-explorer/gcc-snapshot -fcolor-diagnostics -fno-crash-diagnostics -v --target=powerpc-apple-darwin8 --print-supported-cpus <source>
1.	Compilation construction
2.	Building compilation jobs
3.	Building compilation jobs
 #0 0x00000000036af848 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x36af848)
 #1 0x00000000036acf7c SignalHandler(int) Signals.cpp:0:0
 #2 0x00007fe2fee7a420 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x14420)
 #3 0x00007fe2fe93d00b raise (/lib/x86_64-linux-gnu/libc.so.6+0x4300b)
 #4 0x00007fe2fe91c859 abort (/lib/x86_64-linux-gnu/libc.so.6+0x22859)
 #5 0x00007fe2fe91c729 (/lib/x86_64-linux-gnu/libc.so.6+0x22729)
 #6 0x00007fe2fe92dfd6 (/lib/x86_64-linux-gnu/libc.so.6+0x33fd6)
 #7 0x0000000003ff4d13 (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x3ff4d13)
 #8 0x0000000003ff5ea3 clang::driver::toolchains::DarwinClang::addClangWarningOptions(llvm::SmallVector<char const*, 16u>&) const (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x3ff5ea3)
 #9 0x0000000003fbbfb4 clang::driver::tools::Clang::ConstructJob(clang::driver::Compilation&, clang::driver::JobAction const&, clang::driver::InputInfo const&, llvm::SmallVector<clang::driver::InputInfo, 4u> const&, llvm::opt::ArgList const&, char const*) const (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x3fbbfb4)
#10 0x0000000003f3e8d1 clang::driver::Driver::BuildJobsForActionNoCache(clang::driver::Compilation&, clang::driver::Action const*, clang::driver::ToolChain const*, llvm::StringRef, bool, bool, char const*, std::map<std::pair<clang::driver::Action const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, llvm::SmallVector<clang::driver::InputInfo, 4u>, std::less<std::pair<clang::driver::Action const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>, std::allocator<std::pair<std::pair<clang::driver::Action const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>> const, llvm::SmallVector<clang::driver::InputInfo, 4u>>>>&, clang::driver::Action::OffloadKind) const (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x3f3e8d1)
#11 0x0000000003f3fa60 clang::driver::Driver::BuildJobsForAction(clang::driver::Compilation&, clang::driver::Action const*, clang::driver::ToolChain const*, llvm::StringRef, bool, bool, char const*, std::map<std::pair<clang::driver::Action const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, llvm::SmallVector<clang::driver::InputInfo, 4u>, std::less<std::pair<clang::driver::Action const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>, std::allocator<std::pair<std::pair<clang::driver::Action const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>> const, llvm::SmallVector<clang::driver::InputInfo, 4u>>>>&, clang::driver::Action::OffloadKind) const (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x3f3fa60)
#12 0x0000000003f40579 clang::driver::Driver::BuildJobs(clang::driver::Compilation&) const (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x3f40579)
#13 0x0000000003f51c65 clang::driver::Driver::BuildCompilation(llvm::ArrayRef<char const*>) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x3f51c65)
#14 0x0000000000bd36d1 clang_main(int, char**, llvm::ToolContext const&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0xbd36d1)
#15 0x0000000000ad1421 main (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0xad1421)
#16 0x00007fe2fe91e083 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24083)
#17 0x0000000000bce91e _start (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0xbce91e)
Program terminated with signal: SIGSEGV

@Endilll Endilll added clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' confirmed Verified by a second party crash-on-valid and removed clang:frontend Language frontend issues, e.g. anything involving "Sema" labels Sep 9, 2023
@llvmbot
Copy link
Collaborator Author

llvmbot commented Sep 9, 2023

@llvm/issue-subscribers-clang-driver

@nico
Copy link
Contributor

nico commented Sep 11, 2023

This breaks tests on macOS: http://45.33.8.238/macm1/68904/step_7.txt

Please take a look and revert for now if it takes a while to fix.

@nico nico reopened this Sep 11, 2023
@gulfemsavrun
Copy link
Contributor

gulfemsavrun commented Sep 11, 2023

We started seeing the same test failure (Driver/unsupported-target-arch.c) reported above in the mac builders.

FAIL: Clang :: Driver/unsupported-target-arch.c (10746 of 19210)
******************** TEST 'Clang :: Driver/unsupported-target-arch.c' FAILED ********************
Command Output (stderr):
--
/opt/s/w/ir/x/w/llvm-llvm-project/clang/test/Driver/unsupported-target-arch.c:65:18: error: CHECK-PPCMAC: expected string not found in input
// CHECK-PPCMAC: error: unknown target triple 'unknown-apple-macosx10.4.0'{{$}}
                 ^
/opt/s/w/ir/x/w/llvm_build/tools/clang/test/Driver/Output/unsupported-target-arch.c.tmp.err:1:1: note: scanning from here
error: unknown target triple 'unknown-apple-macosx11.0.0'
^

Input file: /opt/s/w/ir/x/w/llvm_build/tools/clang/test/Driver/Output/unsupported-target-arch.c.tmp.err
Check file: /opt/s/w/ir/x/w/llvm-llvm-project/clang/test/Driver/unsupported-target-arch.c

-dump-input=help explains the following input dump.

Input was:
<<<<<<
          1: error: unknown target triple 'unknown-apple-macosx11.0.0' 
check:65     X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
>>>>>>

--

https://logs.chromium.org/logs/fuchsia/buildbucket/cr-buildbucket/8770308692451134161/+/u/clang/test/stdout

@nico
Copy link
Contributor

nico commented Sep 11, 2023

Fixed in b40a5be. Thanks, @MaskRay!

@nico nico closed this as completed Sep 11, 2023
@nico
Copy link
Contributor

nico commented Sep 11, 2023

Actually, now that check-clang passes, I see that many tests in check-llvm are also broken: http://45.33.8.238/macm1/68957/step_11.txt

I bisected the failure of llvm/test/CodeGen/AMDGPU/bf16.ll to 9f77fac as well.

(git bisect run ./run.sh script:

#!/bin/bash
set -e
ninja -C out/gn llvm/test -j250 || exit 125
out/gn/bin/llvm-lit llvm/test/CodeGen/AMDGPU/bf16.ll -sv

)

@nico nico reopened this Sep 11, 2023
nico added a commit that referenced this issue Sep 11, 2023
…/macos triples"

This reverts commit 9f77fac.

The change unintentionally changed lots of codegen, see
#47698 (comment)

Also revert a follow-up:
This reverts commit b40a5be.
@nico
Copy link
Contributor

nico commented Sep 11, 2023

Here's the output of bin/llc < llvm/test/CodeGen/AMDGPU/bf16.ll -march=amdgcn -mcpu=hawaii -verify-machineinstrs without and with 9f77fac. It's pretty different, and the commit message sounds like that's not intentional.

old.txt
new.txt

So reverted in cc20130 for now, since macOS has been red for over 12h by now.

MaskRay added a commit that referenced this issue Sep 11, 2023
The issue is uncovered by #47698: for IR files without a target triple,
-mtriple= specifies the full target triple while -march= merely sets the
architecture part of the default target triple, leaving a target triple which
may not make sense, e.g. riscv64-apple-darwin.

Therefore, -march= is error-prone and not recommended for tests without a target
triple. The issue has been benign as we recognize $unknown-apple-darwin as ELF instead
of rejecting it outrightly.
MaskRay added a commit that referenced this issue Sep 11, 2023
The issue is uncovered by #47698: for assembly files, -triple= specifies the
full target triple while -arch= merely sets the architecture part of the default
target triple, leaving a target triple which may not make sense, e.g.
riscv64-apple-darwin.

Therefore, -arch= is error-prone and not recommended for tests. The issue has
been benign as we recognize $unknown-apple-darwin as ELF instead of rejecting it
outrightly.

Due to the nature of the issue, we don't see the issue in tests using
architectures that any of Mach-O/COFF/XCOFF supports.
MaskRay added a commit to MaskRay/llvm-project that referenced this issue Sep 11, 2023
…riples

The removal started at https://reviews.llvm.org/D50989 and
https://reviews.llvm.org/D75494 removed the Triple support. Without recognizing
Darwin triples as Mach-O, we will get assertion error in ToolChains/Darwin.h due
to the universal binary mechanism.

Fix llvm#47698

---

This requires fixing many misuses of llc -march= and llvm-mc -arch= (
commits 806761a and 252c423).
AntonRydahl pushed a commit to AntonRydahl/llvm-project that referenced this issue Sep 11, 2023
…/macos triples"

This reverts commit 9f77fac.

The change unintentionally changed lots of codegen, see
llvm#47698 (comment)

Also revert a follow-up:
This reverts commit b40a5be.
AntonRydahl pushed a commit to AntonRydahl/llvm-project that referenced this issue Sep 11, 2023
The issue is uncovered by llvm#47698: for IR files without a target triple,
-mtriple= specifies the full target triple while -march= merely sets the
architecture part of the default target triple, leaving a target triple which
may not make sense, e.g. riscv64-apple-darwin.

Therefore, -march= is error-prone and not recommended for tests without a target
triple. The issue has been benign as we recognize $unknown-apple-darwin as ELF instead
of rejecting it outrightly.
AntonRydahl pushed a commit to AntonRydahl/llvm-project that referenced this issue Sep 11, 2023
The issue is uncovered by llvm#47698: for assembly files, -triple= specifies the
full target triple while -arch= merely sets the architecture part of the default
target triple, leaving a target triple which may not make sense, e.g.
riscv64-apple-darwin.

Therefore, -arch= is error-prone and not recommended for tests. The issue has
been benign as we recognize $unknown-apple-darwin as ELF instead of rejecting it
outrightly.

Due to the nature of the issue, we don't see the issue in tests using
architectures that any of Mach-O/COFF/XCOFF supports.
ZijunZhaoCCK pushed a commit to ZijunZhaoCCK/llvm-project that referenced this issue Sep 19, 2023
…riples

The removal started at https://reviews.llvm.org/D50989 and
https://reviews.llvm.org/D75494 removed the Triple support. Without recognizing
Darwin triples as Mach-O, we will get assertion error in ToolChains/Darwin.h due
to the universal binary mechanism.

Fix llvm#47698
ZijunZhaoCCK pushed a commit to ZijunZhaoCCK/llvm-project that referenced this issue Sep 19, 2023
…/macos triples"

This reverts commit 9f77fac.

The change unintentionally changed lots of codegen, see
llvm#47698 (comment)

Also revert a follow-up:
This reverts commit b40a5be.
ZijunZhaoCCK pushed a commit to ZijunZhaoCCK/llvm-project that referenced this issue Sep 19, 2023
The issue is uncovered by llvm#47698: for IR files without a target triple,
-mtriple= specifies the full target triple while -march= merely sets the
architecture part of the default target triple, leaving a target triple which
may not make sense, e.g. riscv64-apple-darwin.

Therefore, -march= is error-prone and not recommended for tests without a target
triple. The issue has been benign as we recognize $unknown-apple-darwin as ELF instead
of rejecting it outrightly.
ZijunZhaoCCK pushed a commit to ZijunZhaoCCK/llvm-project that referenced this issue Sep 19, 2023
The issue is uncovered by llvm#47698: for assembly files, -triple= specifies the
full target triple while -arch= merely sets the architecture part of the default
target triple, leaving a target triple which may not make sense, e.g.
riscv64-apple-darwin.

Therefore, -arch= is error-prone and not recommended for tests. The issue has
been benign as we recognize $unknown-apple-darwin as ELF instead of rejecting it
outrightly.

Due to the nature of the issue, we don't see the issue in tests using
architectures that any of Mach-O/COFF/XCOFF supports.
ZijunZhaoCCK pushed a commit to ZijunZhaoCCK/llvm-project that referenced this issue Sep 19, 2023
…riples

The removal started at https://reviews.llvm.org/D50989 and
https://reviews.llvm.org/D75494 removed the Triple support. Without recognizing
Darwin triples as Mach-O, we will get assertion error in ToolChains/Darwin.h due
to the universal binary mechanism.

Fix llvm#47698

---

This requires fixing many misuses of llc -march= and llvm-mc -arch= (
commits 806761a and 252c423).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' confirmed Verified by a second party crash-on-valid
Projects
None yet
Development

No branches or pull requests

4 participants