[clang] [Driver] Fix Arm/AArch64 Link Argument tests (PR #144582)

Garvit Gupta via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 17 12:57:13 PDT 2025


quic-garvgupt wrote:

> `ToolChain::UnwindLibType ToolChain::GetUnwindLibType( const ArgList &Args) const { if (unwindLibType) return *unwindLibType;
> 
> const Arg *A = Args.getLastArg(options::OPT_unwindlib_EQ); StringRef LibName = A ? A->getValue() : CLANG_DEFAULT_UNWINDLIB;`
> 
> If --unwindlib= is not set to empty explicitly, then `CLANG_DEFAULT_UNWINDLIB` overrides. I think, adding `--unwindlib=`, might fix the tests.



> `ToolChain::UnwindLibType ToolChain::GetUnwindLibType( const ArgList &Args) const { if (unwindLibType) return *unwindLibType;
> 
> const Arg *A = Args.getLastArg(options::OPT_unwindlib_EQ); StringRef LibName = A ? A->getValue() : CLANG_DEFAULT_UNWINDLIB;`
> 
> If --unwindlib= is not set to empty explicitly, then `CLANG_DEFAULT_UNWINDLIB` overrides. I think, adding `--unwindlib=`, might fix the tests.

I revisited the tests and realized that for the ARM and RISC-V targets, the flow goes through `GetDefaultUnwindLibType`, which defaults to `UNW_None`. Explicitly adding `--unwindlib= ` to the failing instance would make the test redundant, as it would no longer validate the intended behavior. Please disregard my earlier comment—I'm aligned with this fix. Thanks for pushing the change!

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


More information about the cfe-commits mailing list