[PATCH] D142595: [Driver][AVR] Don't emit default '-Tdata' when a linker script is specified

2023-01-29 Thread Ben Shi via Phabricator via cfe-commits
benshi001 added a comment. In D142595#4089124 , @MaskRay wrote: > OK. If this doesn't add `-Tdata=` driver options, I'm fine with it. > But why is default `-Tdata` added in the first place? > > Most linker scripts are added as `-Wl,-T,a.lds` (`-Wl,`

[PATCH] D142595: [Driver][AVR] Don't emit default '-Tdata' when a linker script is specified

2023-01-29 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. OK. If this doesn't add `-Tdata=` driver options, I'm fine with it. But why is default `-Tdata` added in the first place? Most linker scripts are added as `-Wl,-T,a.lds` (`-Wl,` values are opaque to the driver), so the driver cannot really know whether a linker script

[PATCH] D142595: [Driver][AVR] Don't emit default '-Tdata' when a linker script is specified

2023-01-28 Thread Ben Shi via Phabricator via cfe-commits
benshi001 added inline comments. Comment at: clang/lib/Driver/ToolChains/AVR.cpp:500 - if (SectionAddressData) { -CmdArgs.push_back(Args.MakeArgString( -"-Tdata=0x" + Twine::utohexstr(*SectionAddressData))); - } else { -// We do not have an entry for this CPU

[PATCH] D142595: [Driver][AVR] Don't emit default '-Tdata' when a linker script is specified

2023-01-28 Thread Ben Shi via Phabricator via cfe-commits
benshi001 updated this revision to Diff 493053. benshi001 edited the summary of this revision. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142595/new/ https://reviews.llvm.org/D142595 Files: clang/lib/Driver/ToolChains/AVR.cpp

[PATCH] D142595: [Driver][AVR] Don't emit default '-Tdata' when a linker script is specified

2023-01-28 Thread Ben Shi via Phabricator via cfe-commits
benshi001 added a comment. In D142595#4088364 , @MaskRay wrote: > This is probably not a good idea. See > https://github.com/llvm/llvm-project/issues/60203#issuecomment-1407532083 I agree with your comment in

[PATCH] D142595: [Driver][AVR] Don't emit default '-Tdata' when a linker script is specified

2023-01-28 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay requested changes to this revision. MaskRay added a comment. This revision now requires changes to proceed. This is probably not a good idea. See https://github.com/llvm/llvm-project/issues/60203#issuecomment-1407532083 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D142595: [Driver][AVR] Don't emit default '-Tdata' when a linker script is specified

2023-01-25 Thread Ben Shi via Phabricator via cfe-commits
benshi001 created this revision. benshi001 added reviewers: MaskRay, aykevl, Miss_Grape. Herald added subscribers: Jim, dylanmckay. Herald added a project: All. benshi001 requested review of this revision. Herald added subscribers: cfe-commits, jacquesguan. Herald added a project: clang. Fixes