commit | f87484d5910c1c708bfd93ef588d6ff8307e2477 | [log] [tgz] |
---|---|---|
author | Zichen Lu <mikaovo2000@gmail.com> | Wed Nov 06 18:51:18 2024 +0800 |
committer | GitHub <noreply@github.com> | Wed Nov 06 11:51:18 2024 +0100 |
tree | a1b05320465b16e411e3c047e08f9f11e3b8104c | |
parent | 5a16ed96c5362aa8e9610fa266d6f6202b19edc3 [diff] |
Fix libnvptxcompiler_static.a absolute path (#115015) Now when building llvm-solid with `-DMLIR_ENABLE_NVPTXCOMPILER=ON`, there will be an absolute path (`/path/to/libnvptxcompiler_static.a`) in MLIRNVVMTarget dependencies (in `/build/path/install/lib/cmake/mlir/MLIRTargets.cmake`). For example, ```cmake set_target_properties(MLIRNVVMTarget PROPERTIES INTERFACE_LINK_LIBRARIES "MLIRIR;MLIRExecutionEngineUtils;MLIRSupport;MLIRGPUDialect;MLIRTargetLLVM;MLIRNVVMToLLVMIRTranslation;LLVMSupport;/path/to/libnvptxcompiler_static.a" ) ``` If downstream project uses pre-built llvm and depends on MLIRNVVMTarget, it may fail to build due to the absence of the `libnvptxcompiler_static.a` absolute path. After this commit, there will no absolute path in `/build/path/install/lib/cmake/mlir/MLIRTargets.cmake` ```cmake set_target_properties(MLIRNVVMTarget PROPERTIES INTERFACE_LINK_LIBRARIES "MLIRIR;MLIRExecutionEngineUtils;MLIRSupport;MLIRGPUDialect;MLIRTargetLLVM;MLIRNVVMToLLVMIRTranslation;LLVMSupport;\$<LINK_ONLY:MLIR_NVPTXCOMPILER_LIB>" ) ``` Then downstream project can modify `libnvptxcompiler_static.a` path and use cmake to build. For example, ```cmake # find_library(...) add_library(MLIR_NVPTXCOMPILER_LIB STATIC IMPORTED GLOBAL) set_property(TARGET MLIR_NVPTXCOMPILER_LIB PROPERTY IMPORTED_LOCATION ${...}) ```
Welcome to the LLVM project!
This repository contains the source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and run-time environments.
The LLVM project has multiple components. The core of the project is itself called “LLVM”. This contains all of the tools, libraries, and header files needed to process intermediate representations and convert them into object files. Tools include an assembler, disassembler, bitcode analyzer, and bitcode optimizer.
C-like languages use the Clang frontend. This component compiles C, C++, Objective-C, and Objective-C++ code into LLVM bitcode -- and from there into object files, using LLVM.
Other components include: the libc++ C++ standard library, the LLD linker, and more.
Consult the Getting Started with LLVM page for information on building and running LLVM.
For information on how to contribute to the LLVM project, please take a look at the Contributing to LLVM guide.
Join the LLVM Discourse forums, Discord chat, LLVM Office Hours or Regular sync-ups.
The LLVM project has adopted a code of conduct for participants to all modes of communication within the project.