Comments (4)
alright, i was able to (hackily) get it working with these changes:
diff --git a/src/circt-sys/build.rs b/src/circt-sys/build.rs
index b50db1c..ed3002f 100644
--- a/src/circt-sys/build.rs
+++ b/src/circt-sys/build.rs
@@ -26,7 +26,7 @@ fn main() {
.unwrap_or_else(|_| llvm_dir.join("build"));
// CIRCT/LLVM/MLIR libraries
- let lib_dirs = [circt_build_dir.join("lib"), llvm_build_dir.join("lib")];
+ let lib_dirs = [circt_build_dir.join("lib"), llvm_build_dir.join("lib"), PathBuf::from("/usr/local/Cellar/llvm/13.0.1_1/lib/")];
let lib_names = [
"CIRCTCAPIComb",
"CIRCTCAPIHW",
@@ -84,8 +84,9 @@ fn main() {
// System libraries
let system_libraries = [
- "stdc++", // llvm-config --system-libs --link-static
- "rt", "dl", "pthread", "m", "z", "tinfo",
+"LLVM-13",
+"m", "z", "curses", "xml2"
+
];
for name in &system_libraries {
println!("cargo:rustc-link-lib=dylib={}", name);
from moore.
That's fantastic thanks. I haven't tried the build on OSX in a while. Probably worth adding a CI job for it. Out of curiosity: the manual homebrew cellar path you had to add -- would that show up in llvm-config --system-libs --link-static
? That might be a portable way of getting at the necessary system libs.
from moore.
Yup, llvm-config
provides that info on Mac. Here are various calls to llvm-config
and their results on Mac:
➜ moore git:(master) ✗ /usr/local/Cellar/llvm/13.0.1_1/bin/llvm-config --libs --link-shared
-lLLVM-13
➜ moore git:(master) ✗ /usr/local/Cellar/llvm/13.0.1_1/bin/llvm-config --system-libs --link-shared
➜ moore git:(master) ✗ /usr/local/Cellar/llvm/13.0.1_1/bin/llvm-config --libs --link-static
-lLLVMWindowsManifest -lLLVMXRay -lLLVMLibDriver -lLLVMDlltoolDriver -lLLVMCoverage -lLLVMLineEditor -lLLVMXCoreDisassembler -lLLVMXCoreCodeGen -lLLVMXCoreDesc -lLLVMXCoreInfo -lLLVMX86Disassembler -lLLVMX86AsmParser -lLLVMX86CodeGen -lLLVMX86Desc -lLLVMX86Info -lLLVMWebAssemblyDisassembler -lLLVMWebAssemblyAsmParser -lLLVMWebAssemblyCodeGen -lLLVMWebAssemblyDesc -lLLVMWebAssemblyUtils -lLLVMWebAssemblyInfo -lLLVMSystemZDisassembler -lLLVMSystemZAsmParser -lLLVMSystemZCodeGen -lLLVMSystemZDesc -lLLVMSystemZInfo -lLLVMSparcDisassembler -lLLVMSparcAsmParser -lLLVMSparcCodeGen -lLLVMSparcDesc -lLLVMSparcInfo -lLLVMRISCVDisassembler -lLLVMRISCVAsmParser -lLLVMRISCVCodeGen -lLLVMRISCVDesc -lLLVMRISCVInfo -lLLVMPowerPCDisassembler -lLLVMPowerPCAsmParser -lLLVMPowerPCCodeGen -lLLVMPowerPCDesc -lLLVMPowerPCInfo -lLLVMNVPTXCodeGen -lLLVMNVPTXDesc -lLLVMNVPTXInfo -lLLVMMSP430Disassembler -lLLVMMSP430AsmParser -lLLVMMSP430CodeGen -lLLVMMSP430Desc -lLLVMMSP430Info -lLLVMMipsDisassembler -lLLVMMipsAsmParser -lLLVMMipsCodeGen -lLLVMMipsDesc -lLLVMMipsInfo -lLLVMLanaiDisassembler -lLLVMLanaiCodeGen -lLLVMLanaiAsmParser -lLLVMLanaiDesc -lLLVMLanaiInfo -lLLVMHexagonDisassembler -lLLVMHexagonCodeGen -lLLVMHexagonAsmParser -lLLVMHexagonDesc -lLLVMHexagonInfo -lLLVMBPFDisassembler -lLLVMBPFAsmParser -lLLVMBPFCodeGen -lLLVMBPFDesc -lLLVMBPFInfo -lLLVMAVRDisassembler -lLLVMAVRAsmParser -lLLVMAVRCodeGen -lLLVMAVRDesc -lLLVMAVRInfo -lLLVMARMDisassembler -lLLVMARMAsmParser -lLLVMARMCodeGen -lLLVMARMDesc -lLLVMARMUtils -lLLVMARMInfo -lLLVMAMDGPUDisassembler -lLLVMAMDGPUAsmParser -lLLVMAMDGPUCodeGen -lLLVMAMDGPUDesc -lLLVMAMDGPUUtils -lLLVMAMDGPUInfo -lLLVMAArch64Disassembler -lLLVMAArch64AsmParser -lLLVMAArch64CodeGen -lLLVMAArch64Desc -lLLVMAArch64Utils -lLLVMAArch64Info -lLLVMOrcJIT -lLLVMMCJIT -lLLVMJITLink -lLLVMInterpreter -lLLVMExecutionEngine -lLLVMRuntimeDyld -lLLVMOrcTargetProcess -lLLVMOrcShared -lLLVMDWP -lLLVMSymbolize -lLLVMDebugInfoPDB -lLLVMDebugInfoGSYM -lLLVMOption -lLLVMObjectYAML -lLLVMMCA -lLLVMMCDisassembler -lLLVMLTO -lLLVMCFGuard -lLLVMFrontendOpenACC -lLLVMExtensions -lPolly -lPollyISL -lLLVMPasses -lLLVMObjCARCOpts -lLLVMCoroutines -lLLVMipo -lLLVMInstrumentation -lLLVMVectorize -lLLVMLinker -lLLVMFrontendOpenMP -lLLVMDWARFLinker -lLLVMGlobalISel -lLLVMMIRParser -lLLVMAsmPrinter -lLLVMDebugInfoMSF -lLLVMDebugInfoDWARF -lLLVMSelectionDAG -lLLVMCodeGen -lLLVMIRReader -lLLVMAsmParser -lLLVMInterfaceStub -lLLVMFileCheck -lLLVMFuzzMutate -lLLVMTarget -lLLVMScalarOpts -lLLVMInstCombine -lLLVMAggressiveInstCombine -lLLVMTransformUtils -lLLVMBitWriter -lLLVMAnalysis -lLLVMProfileData -lLLVMObject -lLLVMTextAPI -lLLVMMCParser -lLLVMMC -lLLVMDebugInfoCodeView -lLLVMBitReader -lLLVMCore -lLLVMRemarks -lLLVMBitstreamReader -lLLVMBinaryFormat -lLLVMTableGen -lLLVMSupport -lLLVMDemangle
➜ moore git:(master) ✗ /usr/local/Cellar/llvm/13.0.1_1/bin/llvm-config --system-libs --link-static
-lm -lz -lcurses -lxml2
➜ moore git:(master) ✗ /usr/local/Cellar/llvm/13.0.1_1/bin/llvm-config --libdir
/usr/local/Cellar/llvm/13.0.1_1/lib
from moore.
Awesome thanks! I've pushed a few changes to master that try to make use of llvm-config
for the build. Do these work for you?
from moore.
Related Issues (20)
- Possible bug in port type carry-over logic
- Add option to treat unknown modules as external
- Declare module names in a separate namespace
- Non-constant case item not supported HOT 1
- Generate items ignored in svlog output HOT 4
- Consider adding support for importing / exporting UHDM HOT 1
- problems about ports when build in hierachy
- problems about ports when build in hierachy HOT 1
- Add CIRCT HW/Comb/LLHD as backend HOT 4
- Is there a plan to implent moore in c++? HOT 2
- Add Moore MIR dialect and move codegen to CIRCT HOT 9
- Remove legacy LLHD crate codegen and dependency
- Eliminate HIR in favor of AST-specific queries
- Is there a plan to support System Verilog features like Classes/Constraints/Interfaces? HOT 1
- building error? cannot find MLIRExecutionEngine? HOT 7
- Build and Install problems in moore HOT 5
- Desync between cargo build and repo. HOT 2
- Build fails due to missing `Standard.h` file in mlir-c/Dialect HOT 2
- Build fails due to type deduction HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from moore.