[PATCH] D67508: [RISCV] support mutilib in baremetal environment

2019-10-24 Thread Kuan Hsu Chen via Phabricator via cfe-commits
khchen added a comment. Herald added a subscriber: sameer.abuasal. @lenary You patch is very useful to look up the default march, thanks! But there is some issue if we set the default rv32 march as `rv32gc`. Because the default multilib does not include `rv32gc`/`lp32d` in riscv gnu toolchain,

[PATCH] D69383: [RISCV] Match GCC `-march`/`-mabi` driver defaults

2019-10-24 Thread Kuan Hsu Chen via Phabricator via cfe-commits
khchen added inline comments. Herald added a subscriber: sameer.abuasal. Comment at: clang/lib/Driver/ToolChains/Arch/RISCV.cpp:537 + if (Triple.getArch() == llvm::Triple::riscv32) +return "rv32gc"; else Why do you set rv32gc and rv64gc as default march?

[PATCH] D67508: [RISCV] support mutilib in baremetal environment

2019-10-23 Thread Kuan Hsu Chen via Phabricator via cfe-commits
khchen marked 2 inline comments as done. khchen added inline comments. Comment at: clang/lib/Driver/ToolChains/Gnu.cpp:1547 + else if (IsRV64) +MArch = "rv64i"; + else lenary wrote: > I think this line is the issue: where someone doesn't specify `-march`, y

[PATCH] D67508: [RISCV] support mutilib in baremetal environment

2019-10-15 Thread Kuan Hsu Chen via Phabricator via cfe-commits
khchen marked 2 inline comments as done. khchen added inline comments. Comment at: clang/lib/Driver/ToolChains/Gnu.cpp:1521 + {"rv32i", "ilp32"},{"rv32im", "ilp32"}, {"rv32iac", "ilp32"}, + {"rv32imac", "ilp32"}, {"rv32imafc", "ilp32f"}, {"rv64i", "lp64"}, +

[PATCH] D67508: [RISCV] support mutilib in baremetal environment

2019-10-15 Thread Kuan Hsu Chen via Phabricator via cfe-commits
khchen updated this revision to Diff 225068. khchen edited the summary of this revision. khchen added a comment. @lenary Sorry, I don't have the plan to support `MULTILIB_REUSE` now. But if it's necessary to support it, I can do it later. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D6

[PATCH] D67409: [RISCV] enable LTO support, pass some options to linker.

2019-10-14 Thread Kuan Hsu Chen via Phabricator via cfe-commits
khchen added a comment. In D67409#1707940 , @lenary wrote: > @khchen do you need me to commit this for you? Yes, please help me, thanks. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67409/new/ https://reviews.llvm.org/D67409 __

[PATCH] D67409: [RISCV] enable LTO support, pass some options to linker.

2019-10-14 Thread Kuan Hsu Chen via Phabricator via cfe-commits
khchen updated this revision to Diff 224821. khchen added a comment. rebase master, https://reviews.llvm.org/D66003 changed the `riscv::getRISCVTargetFeatures` interface. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67409/new/ https://reviews.llvm.org/D67409 Files: clang/lib/Drive

[PATCH] D67385: Pass -mcmodel to LTO plugin

2019-09-24 Thread Kuan Hsu Chen via Phabricator via cfe-commits
khchen added a comment. In D67385#1680959 , @tejohnson wrote: > In D67385#1680942 , @khchen wrote: > > > @tejohnson for example: > > > > $ clang -flto a.c -c -o a.o > > $ llvm-ar q a.a a.o // archive li

[PATCH] D67385: Pass -mcmodel to LTO plugin

2019-09-24 Thread Kuan Hsu Chen via Phabricator via cfe-commits
khchen added a comment. @tejohnson for example: $ clang -flto a.c -c -o a.o $ llvm-ar q a.a a.o // archive libraries $ clang -flto a.a b.c -O2 -o main -mcmodel=small In above case user need to aware that passing `-Wl,-plugin-opt=-code-model=small` to plugin is necessary. I

[PATCH] D67385: Pass -mcmodel to LTO plugin

2019-09-23 Thread Kuan Hsu Chen via Phabricator via cfe-commits
khchen added a comment. @tejohnson when I run the `clang -flto -Wl,-plugin-opt=-help` command, it shows the --code-model= - Choose code model =tiny- Tiny code model =small

[PATCH] D67385: Pass -mcmodel to LTO plugin

2019-09-22 Thread Kuan Hsu Chen via Phabricator via cfe-commits
khchen added a comment. ping Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67385/new/ https://reviews.llvm.org/D67385 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/lis

[PATCH] D67409: [RISCV] enable LTO support, pass some options to linker.

2019-09-22 Thread Kuan Hsu Chen via Phabricator via cfe-commits
khchen added a comment. ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67409/new/ https://reviews.llvm.org/D67409 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D67508: [RISCV] support mutilib in baremetal environment

2019-09-22 Thread Kuan Hsu Chen via Phabricator via cfe-commits
khchen added a comment. ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67508/new/ https://reviews.llvm.org/D67508 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D67508: [RISCV] support mutilib in baremetal environment

2019-09-18 Thread Kuan Hsu Chen via Phabricator via cfe-commits
khchen marked 3 inline comments as done. khchen added inline comments. Comment at: clang/lib/Driver/ToolChains/Gnu.cpp:1548 +{M.gccSuffix(), + "/../../../../riscv64-unknown-elf/lib" + M.gccSuffix()}); + }); kito-cheng wrot

[PATCH] D67508: [RISCV] support mutilib in baremetal environment

2019-09-18 Thread Kuan Hsu Chen via Phabricator via cfe-commits
khchen updated this revision to Diff 220687. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67508/new/ https://reviews.llvm.org/D67508 Files: clang/lib/Driver/ToolChains/Gnu.cpp clang/lib/Driver/ToolChains/RISCVToolchain.cpp clang/test/Driver/Inputs/multilib_riscv_elf_sdk/lib/gcc/r

[PATCH] D67508: [RISCV] support mutilib in baremetal environment

2019-09-18 Thread Kuan Hsu Chen via Phabricator via cfe-commits
khchen updated this revision to Diff 220686. khchen marked an inline comment as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67508/new/ https://reviews.llvm.org/D67508 Files: clang/lib/Driver/ToolChains/Gnu.cpp clang/lib/Driver/ToolChains/RISCVToolchain.cpp clang/test/Drive

[PATCH] D67409: [RISCV] enable LTO support, pass some options to linker.

2019-09-18 Thread Kuan Hsu Chen via Phabricator via cfe-commits
khchen updated this revision to Diff 220668. khchen added a comment. Thanks @lenary, I fixed it. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67409/new/ https://reviews.llvm.org/D67409 Files: clang/lib/Driver/ToolChains/Clang.cpp clang/lib/Driver/ToolChains/CommonArgs.cpp clang/

[PATCH] D67385: Pass -mcmodel to LTO plugin

2019-09-14 Thread Kuan Hsu Chen via Phabricator via cfe-commits
khchen updated this revision to Diff 220218. khchen retitled this revision from "Pass -mcmodel to gold-pulgin" to "Pass -mcmodel to LTO plugin". khchen edited the summary of this revision. khchen added a comment. Herald added subscribers: steven_wu, inglorion. added a test CHANGES SINCE LAST AC

[PATCH] D67409: [RISCV] enable LTO support, pass some options to linker.

2019-09-14 Thread Kuan Hsu Chen via Phabricator via cfe-commits
khchen updated this revision to Diff 220214. khchen edited the summary of this revision. khchen added a comment. Herald added subscribers: fedor.sergeev, aheejin, dschuff. This commit is inspired by @MaskRay's suggestion, I think maybe fix the insufficient of clang::driver:tools::AddGoldPlugin is

[PATCH] D67409: [RISCV] enable LTO support, pass some options to linker.

2019-09-12 Thread Kuan Hsu Chen via Phabricator via cfe-commits
khchen added inline comments. Comment at: clang/lib/Driver/ToolChains/Arch/RISCV.cpp:387 + +void riscv::addGoldOptions(const ToolChain &ToolChain, + const llvm::opt::ArgList &Args, kito-cheng wrote: > MaskRay wrote: > > gold doesn't supp

[PATCH] D67409: [RISCV] enable LTO support, pass some options to linker.

2019-09-12 Thread Kuan Hsu Chen via Phabricator via cfe-commits
khchen updated this revision to Diff 219941. khchen added a comment. @lenary Yes, you are right. add LTO support for Linux platform. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67409/new/ https://reviews.llvm.org/D67409 Files: clang/lib/Driver/ToolChains/Arch/RISCV.cpp clang/lib/

[PATCH] D67409: [RISCV] enable LTO support, pass some options to linker.

2019-09-10 Thread Kuan Hsu Chen via Phabricator via cfe-commits
khchen created this revision. khchen added a project: clang. Herald added subscribers: pzheng, s.egerton, lenary, Jim, benna, psnobl, jocewei, PkmX, rkruppe, dexonsmith, the_o, brucehoult, MartinMosbeck, rogfer01, steven_wu, edward-jones, zzheng, MaskRay, jrtc27, shiva0217, kito-cheng, niosHD, s