Skip to content
Snippets Groups Projects
  1. Oct 19, 2024
  2. Oct 15, 2024
  3. Oct 03, 2024
  4. Oct 02, 2024
  5. Sep 18, 2024
  6. Aug 23, 2024
  7. Aug 22, 2024
    • vadorovsky's avatar
      build: Fix build for variety of musl-based Linux distributions · ac55b2a9
      vadorovsky authored
      Before this change, build.rs had two problems which were making it
      impossible to build on different musl-based Linux environments:
      
      - It was assuming that the C++ library on all musl-based systems is
        LLVM libc++.
        - In the most cases, it's the opposite. LLVM packaged in Alpine is
          linked against GNU libstdc++, as well as LLVM tarballs in Rust CI.
        - Gentoo with musl-llvm profile, even though it links LLVM against
          libc++, has a different name for the system-wide static library
          (`/usr/lib/libc++_static.a` instead of `/usr/lib/libc++.a`, which
          is a link script).
      - When linking runtime libraries statically (`crt-static`), Cargo doesn't
        look for the system-wide static libraries in `/usr/lib`, unless that
        directory is added to the link flags with `-L`.
      
      The first point is addressed by:
      
      - Linking to libstdc++ by default, even for musl systems.
      - Ability to override that choice with `LLVM_SYS_LIBCPP` environment
        variable for environments which use LLVM libc++.
      
      The second point is addressed by:
      
      - Adding `/usr/lib` and other system dirs to `cargo::rustc-link-search`
        on Linux with `crt-static` builds.
      - Exposing `LLVM_SYS_SYSTEM_LIBRARY_DIRS` environment variable, where
        callers can add additional paths.
      
      After this change, building llvm-sys on Alpine can be done just with
      the usual `cargo build` and `LLVM_SYS_191_PREFIX` variable pointing to
      the LLVM 19 prefix. In CI, we are using Rust CI tarballs for that.
      
      On any Linux environment where LLVM is linked against libc++, llvm-sys
      can be built with:
      
      ```
      LLVM_SYS_LIBCPP=c++ cargo build --no-default-features
      ```
      
      Building llvm-sys Gentoo with llvm-musl profile, where libc++ static
      library is called `libc++_static.a` and it needs `libc++abi.a` to work,
      can be done with:
      
      ```
      LLVM_SYS_LIBCPP=c++_static RUSTFLAGS="-lc++abi" cargo test --no-default-features
      ```
      
      Unfortunately, the latter configurations are not tested in CI - as for
      now, there are no publicly available libLLVM binary blobs linked against
      LLVM libc++ - such configuration requires compilation of LLVM.
      ac55b2a9
  8. Aug 17, 2024
  9. Aug 03, 2024
  10. Aug 02, 2024
    • Peter Marheine's avatar
      Merge branch 'main' into 'main' · 313cfd50
      Peter Marheine authored
      Make it easier to build on macOS and FreeBSD
      
      See merge request !45
      313cfd50
    • Yorick Peterse's avatar
      Detect Homebrew LLVM paths on macOS · f84767ec
      Yorick Peterse authored
      Homebrew installs LLVM in non-standard locations, and compilers won't
      find the necessary libraries without fiddling around with `brew link`,
      PATH, and LIBRARY_PATH.
      
      This updates the build script such that it tries to automatically detect
      the necessary paths when using Homebrew, removing the need for any
      manual intervention.
      f84767ec
    • Yorick Peterse's avatar
      Also include /usr/local/lib for FreeBSD · 3f1ed8d3
      Yorick Peterse authored
      This is needed to ensure that additional libraries such as zstd are
      found when building.
      3f1ed8d3
  11. Jul 31, 2024
  12. Jun 20, 2024
  13. Jun 19, 2024
  14. Mar 31, 2024
  15. Mar 24, 2024
  16. Mar 23, 2024
  17. Mar 19, 2024
  18. Feb 14, 2024
  19. Dec 04, 2023
  20. Dec 01, 2023
  21. Oct 16, 2023
  22. Oct 15, 2023
    • Peter Marheine's avatar
      Replace regex with regex-lite · 30515ffe
      Peter Marheine authored
      This saves quite a lot of compile time, and since regex uses are minimal
      in this crate (only for matching version numbers) the loss of features
      is unimportant.
      30515ffe
  23. Aug 14, 2023
Loading