[PATCH] D137217: [LTO][COFF] Use bitcode file names in lto native object file names.

2023-03-30 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added inline comments. Comment at: lld/COFF/LTO.cpp:183 + [&](size_t task, const Twine ) { +buf[task].first = moduleName.str(); return std::make_unique( int3 wrote: > Any reason why this doesn't instead store the module name in the

[PATCH] D137217: [LTO][COFF] Use bitcode file names in lto native object file names.

2023-03-23 Thread Jez Ng via Phabricator via cfe-commits
int3 added a comment. I'm trying to add similar support to lld-macho, hence the question :) Comment at: lld/COFF/LTO.cpp:183 + [&](size_t task, const Twine ) { +buf[task].first = moduleName.str(); return std::make_unique( Any reason why

[PATCH] D137217: [LTO][COFF] Use bitcode file names in lto native object file names.

2022-11-22 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D137217#3945366 , @glandium wrote: > Almost there, but not quite: > > [task 2022-11-22T23:55:36.341Z] > /builds/worker/fetches/llvm-project/llvm/tools/gold/gold-plugin.cpp:1106:6: > error: no matching function for call to

[PATCH] D137217: [LTO][COFF] Use bitcode file names in lto native object file names.

2022-11-22 Thread Mike Hommey via Phabricator via cfe-commits
glandium added a comment. Almost there, but not quite: [task 2022-11-22T23:55:36.341Z] /builds/worker/fetches/llvm-project/llvm/tools/gold/gold-plugin.cpp:1106:6: error: no matching function for call to object of type '(lambda at

[PATCH] D137217: [LTO][COFF] Use bitcode file names in lto native object file names.

2022-11-22 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added a comment. In D137217#3945136 , @glandium wrote: > Still broken: > > task 2022-11-22T22:09:00.912Z] /usr/lib/llvm-11/bin/clang++ > --sysroot=/builds/worker/fetches/sysroot -DGTEST_HAS_RTTI=0 -D_GNU_SOURCE > -D__STDC_CONSTANT_MACROS

[PATCH] D137217: [LTO][COFF] Use bitcode file names in lto native object file names.

2022-11-22 Thread Mike Hommey via Phabricator via cfe-commits
glandium added a comment. Still broken: task 2022-11-22T22:09:00.912Z] /usr/lib/llvm-11/bin/clang++ --sysroot=/builds/worker/fetches/sysroot -DGTEST_HAS_RTTI=0 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools/gold

[PATCH] D137217: [LTO][COFF] Use bitcode file names in lto native object file names.

2022-11-22 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added a comment. In D137217#3944952 , @glandium wrote: > This broke the gold plugin: > > [task 2022-11-22T21:03:29.486Z] > /builds/worker/fetches/llvm-project/llvm/tools/gold/gold-plugin.cpp:1108:19: > error: no matching function for call to

[PATCH] D137217: [LTO][COFF] Use bitcode file names in lto native object file names.

2022-11-22 Thread Mike Hommey via Phabricator via cfe-commits
glandium added a comment. This broke the gold plugin: [task 2022-11-22T21:03:29.486Z] /builds/worker/fetches/llvm-project/llvm/tools/gold/gold-plugin.cpp:1108:19: error: no matching function for call to 'localCache' [task 2022-11-22T21:03:29.486Z] Cache = check(localCache("ThinLTO",

[PATCH] D137217: [LTO][COFF] Use bitcode file names in lto native object file names.

2022-11-22 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added a comment. Relanded here to match api changes at https://reviews.llvm.org/D135590 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137217/new/

[PATCH] D137217: [LTO][COFF] Use bitcode file names in lto native object file names.

2022-11-22 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. This doesn't build: http://45.33.8.238/win/70474/step_4.txt http://45.33.8.238/linux/92146/step_4.txt Please take a look and revert for now if it takes a while to fix. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D137217: [LTO][COFF] Use bitcode file names in lto native object file names.

2022-11-22 Thread Zequan Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG531ed6d5aa65: [LTO][COFF] Use bitcode file names in lto native object file names. (authored by zequanwu). Changed prior to commit: https://reviews.llvm.org/D137217?vs=477014=477246#toc Repository:

[PATCH] D137217: [LTO][COFF] Use bitcode file names in lto native object file names.

2022-11-21 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 477014. zequanwu added a comment. Update `Twine` argument to `const Twine&`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137217/new/ https://reviews.llvm.org/D137217 Files:

[PATCH] D137217: [LTO][COFF] Use bitcode file names in lto native object file names.

2022-11-19 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp:846 + auto AddStream = [&](size_t Task, + Twine ModuleName) -> std::unique_ptr { int FD = -1; `Twine` should only be used as const

[PATCH] D137217: [LTO][COFF] Use bitcode file names in lto native object file names.

2022-11-18 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson accepted this revision. tejohnson added a comment. This revision is now accepted and ready to land. lgtm Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137217/new/ https://reviews.llvm.org/D137217

[PATCH] D137217: [LTO][COFF] Use bitcode file names in lto native object file names.

2022-11-16 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added inline comments. Comment at: lld/COFF/LTO.cpp:238 + sys::path::append(path, directory, +outputFileBaseName + ".lto." + baseName); + sys::path::remove_dots(path, true); tejohnson wrote: > MaskRay wrote: > > What if

[PATCH] D137217: [LTO][COFF] Use bitcode file names in lto native object file names.

2022-11-16 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 475895. zequanwu marked an inline comment as done. zequanwu added a comment. Address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137217/new/ https://reviews.llvm.org/D137217 Files:

[PATCH] D137217: [LTO][COFF] Use bitcode file names in lto native object file names.

2022-11-16 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added inline comments. Comment at: lld/COFF/LTO.cpp:238 + sys::path::append(path, directory, +outputFileBaseName + ".lto." + baseName); + sys::path::remove_dots(path, true); MaskRay wrote: > What if two input bitcode

[PATCH] D137217: [LTO][COFF] Use bitcode file names in lto native object file names.

2022-11-15 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: lld/COFF/LTO.cpp:229 +StringRef ltoObjName; +if (bitcodeFilePath == "ld-temp.o") { + ltoObjName = MaskRay wrote: > tejohnson wrote: > > zequanwu wrote: > > > tejohnson wrote: > > > > This case should always

[PATCH] D137217: [LTO][COFF] Use bitcode file names in lto native object file names.

2022-11-15 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D137217#3926601 , @tejohnson wrote: > @MaskRay wondering if this is a good change to make for ELF as well, wdyt? Yes, I think this is a good idea and improves debuggability. The change is non-trivial so so this patch

[PATCH] D137217: [LTO][COFF] Use bitcode file names in lto native object file names.

2022-11-15 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 475538. zequanwu marked 2 inline comments as done. zequanwu added a comment. Update. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137217/new/ https://reviews.llvm.org/D137217 Files:

[PATCH] D137217: [LTO][COFF] Use bitcode file names in lto native object file names.

2022-11-14 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. @MaskRay wondering if this is a good change to make for ELF as well, wdyt? Comment at: clang/lib/CodeGen/BackendUtil.cpp:1104 - auto AddStream = [&](size_t Task) { + auto AddStream = [&](size_t Task, Twine File) { return

[PATCH] D137217: [LTO][COFF] Use bitcode file names in lto native object file names.

2022-11-14 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added inline comments. Comment at: clang/lib/CodeGen/BackendUtil.cpp:1104 - auto AddStream = [&](size_t Task) { + auto AddStream = [&](size_t Task, Twine File) { return std::make_unique(std::move(OS), tejohnson wrote: > I think you might need

[PATCH] D137217: [LTO][COFF] Use bitcode file names in lto native object file names.

2022-11-14 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 475296. zequanwu marked 2 inline comments as done. zequanwu added a comment. Update. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137217/new/ https://reviews.llvm.org/D137217 Files:

[PATCH] D137217: [LTO][COFF] Use bitcode file names in lto native object file names.

2022-11-14 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. The naming convention used here for COFF is actually very similar to what is done for other ThinLTO save-temps output files, which are placed at the input module locations. We may want to just do this across the board. @MaskRay wdyt? A few other questions/comments

[PATCH] D137217: [LTO][COFF] Use bitcode file names in lto native object file names.

2022-11-14 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added a comment. Ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137217/new/ https://reviews.llvm.org/D137217 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D137217: [LTO][COFF] Use bitcode file names in lto native object file names.

2022-11-01 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu created this revision. zequanwu added reviewers: rnk, tejohnson, mehdi_amini. Herald added subscribers: pmatos, asb, ormris, steven_wu, hiraditya, arichardson, inglorion, sbc100, emaste. Herald added a reviewer: MaskRay. Herald added projects: lld-macho, All. Herald added a reviewer: