Repository navigation
Add llvm linker tool for RISCV target - #5348
Conversation
|
Context: This is the followup patch for the discussion in #5199 (comment) |
It pretty much follows the Unix settup. However, the user need to set the IREE_LLVMAOT_LINKER_PATH explicitly with the clang built for RISCV. This also removes the following noisy clang warning of: > warning: argument unused during compilation: '-undefined suppress' [-Wunused-command-line-argument]
| auto toolPath = LinkerTool::getToolPath(); | ||
| if (!toolPath.empty()) return toolPath; | ||
|
|
||
| llvm::errs() << "IREE_LLVMAOT_LINKER_PATH environment variable must be set" |
There was a problem hiding this comment.
This is just enforcing setting the env linker path, You can follow Android linker https://github.com/google/iree/blob/main/iree/compiler/Dialect/HAL/Target/LLVM/internal/AndroidLinkerTool.cpp#L84
and query one of the environment variables you use to build the runtime for RISK-V. In the android linker for example we set ANDRID_NDK to build the android runtime then the same variable is used again in linker.
There was a problem hiding this comment.
Thanks for the suggestion. For RISC-V the toolchain was defined in a custom cmake file so originally there's no environment variable to be set. I followed Android's example and set one for RISC-V. Also update the doc and the bootstrap script to reflect that. Please take a look.
|
Ahmed has more context on this than me. |
ADD RISCV_TOOLCHAIN_ROOT for RISC-V cross-compilation. The original IREE_LLVMAOT_LINKER_PATH still works but could cause problems in native compile. Update the doc and bootstrap script accordingly.
* f02a32f Add llvm linker tool for RISCV target (#5348) * 2e43671 Merge google -> main (#5526) * 289c43c Update objectives.md (#5525) * a6cc962 Use --first-parent when summarizing branch merge changes (#5527) * be2ff17 Added tests for tosa.reduce_* (#5471) COPYBARA_INTEGRATE_REVIEW=#5530 from GMNGeoffrey:main-to-google f02a32f PiperOrigin-RevId: 369354317
It pretty much follows the Unix setup. However, the user need to set
the RISCV_TOOLCHAIN_ROOT for RISC-V cross-compilation. The original
IREE_LLVMAOT_LINKER_PATH still works but could cause problems in native
compile.
Update the doc and bootstrap script accordingly.
This also removes the following noisy clang warning of: