Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Bazel build instructions and elaborated them #2

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Nov 22, 2022

  1. Fix Bazel build instructions and elaborated them

    The `bazel` call that utilized a local LLVM installation failed with
    linker errors because the link order of LLVM libraries wasn't in
    dependency order. The fix is to utilize LLD via the `-fuse-ld` flag. LLD,
    unlike traditional Unix-like linkers, allows for reverse dependencies
    (aka backrefs. See the --warn-backrefs option). Note that the `-fuse-id`
    flag was being used for the Bazel-provided LLVM installation configuration.
    
    Several other changes were made:
    * The build system was broken into two sections: install dependencies and
      build crubit. This was done since the former usually need be done only
      once.
    * Modified the installation instructions to install bazelisk as the
      system installation of bazel was incorrect (the package name is actually
      bazel-bootstrap) and, even if it were correct, would install a version
      that is too old.
    * Clarified the two build options and the reasons why one would prefer
      one to the other.
    * Modified the local LLVM option to build and use `lld`. This reduces
      variance of tooling used to build this project.
    * Added `$LLVM_INSTALL_PATH/bin` to the `PATH` so this compiler is selected
      instead of any system installations.
    camio committed Nov 22, 2022
    Configuration menu
    Copy the full SHA
    4c8ca6a View commit details
    Browse the repository at this point in the history