Coder Social home page Coder Social logo

Comments (10)

rui314 avatar rui314 commented on July 18, 2024 2

@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.

nitsky avatar nitsky commented on July 18, 2024 2

@piegamesde I submitted a nixpkgs PR: NixOS/nixpkgs#128889.

from mold.

rui314 avatar rui314 commented on July 18, 2024

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.

nitsky avatar nitsky commented on July 18, 2024

Submodules will work fine with nix. Would you like to implement the change yourself, or get a PR?

from mold.

rui314 avatar rui314 commented on July 18, 2024

Sounds good. Since adding a submodule is easy, I'll do that for you.

from mold.

nitsky avatar nitsky commented on July 18, 2024

@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.

rui314 avatar rui314 commented on July 18, 2024

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.

nitsky avatar nitsky commented on July 18, 2024

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.

piegamesde avatar piegamesde commented on July 18, 2024

@nitsky Mind sharing your code? See also NixOS/nixpkgs#128706

from mold.

nitsky avatar nitsky commented on July 18, 2024

@piegamesde I'll submit a PR to nixpkgs.

from mold.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.