Comments (10)
@nitsky I made a last-minute change for 0.9 so that mimalloc is no longer a submodule but just a subdirectory. i.e. mold now contains a copy of mimalloc in its subdirectory. mold's makefile no longer tries to do git submodule update
. This should make your life easier.
from mold.
@piegamesde I submitted a nixpkgs PR: NixOS/nixpkgs#128889.
from mold.
mold is statically-linked to mimalloc because as you guessed Ubuntu doesn't have a package of mimalloc. I want mold to use mimalloc as the default malloc as it is measurably faster than even TBBMalloc. We could provide several options to users as to how to build mold -- using mimalloc in /usr/lib, using mimalloc as a static library, or use TBBMalloc as a last resort. However, that might be a little too complicated.
How about adding mimalloc as a git submodule to the project just like I did before? This way, make
doesn't require any network access, and only you have to do is to add --recursive
option to the initial git clone
. Does that work with nix?
from mold.
Submodules will work fine with nix. Would you like to implement the change yourself, or get a PR?
from mold.
Sounds good. Since adding a submodule is easy, I'll do that for you.
from mold.
@rui314 I was successful building mold with nix, but only after applying a patch to remove the git submodule update --init --recursive
in the Makefile. Git operations like this are not allowed in nix's sandboxed builds. Would you consider updating the Makefile to eliminate that command or make it optional?
from mold.
If you run the first clone command as git clone --recursive
, didn't it create mimalloc/CMakeLists.txt
from the beginning? That git submodule update --init --recursive
runs only when mimalloc/CMakeLists.txt
is missing. So, I thought that as long as you run the initial cloning with --recursive
, that make rule wouldn't be triggered.
from mold.
You are right, I made a mistake in my nix configuration, sorry for the trouble. I am now able to package mold with nix. You can close this issue.
from mold.
@nitsky Mind sharing your code? See also NixOS/nixpkgs#128706
from mold.
@piegamesde I'll submit a PR to nixpkgs.
from mold.
Related Issues (20)
- Segmentation fault when compiling ROOT HOT 4
- /usr/lib/mold/mold-wrapper.so: unsupported relocation type 1026 HOT 3
- Binary linked with mold segfaults immediately HOT 5
- [FEATURE REQ/BUG REP] SH4 endianas HOT 7
- x86_64-exception-multiple-ehframe test failure HOT 2
- corrupted .riscv.attributes ISA string
- Very slow symbol lookup speed with gdb HOT 3
- mold fails to build on Debian sid on most of the archs (`error: implicit declaration of function`)
- mold does not accelerate the compile process compare to normal config HOT 15
- Support `libdep` plugin HOT 8
- duplicate symbol of compiler_rt builtin functions HOT 16
- Reference counting of std::shared_ptr is non-atomic when using the mold linker HOT 5
- mold can't be built with itself on mingw HOT 2
- Higher zstd compression levels for debug info HOT 1
- 2 tests fail on RiscV HOT 6
- Compilation on EL-family Linux with GCC leaves `ld.mold` zombies. HOT 2
- Mold 2.32.1 fails to link with unresolved dlopen HOT 1
- Proposal: split debug symbols HOT 4
- Symbol table is empty in `.gdb_index` created by mold HOT 4
- [regession] cannot use lto on MacOS: get_self_path is not supported HOT 1
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 mold.