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

toolchains/cc: Fix process getting killed on aarch64-darwin during li… #479

Merged
merged 1 commit into from
Feb 2, 2024

Commits on Feb 2, 2024

  1. toolchains/cc: Fix process getting killed on aarch64-darwin during li…

    …nking
    
    On aarch64 Darwin, when using a nixpkgs provided cc toolchain, we have [seen][1]
    the linking step to fail as the process got killed:
    
    ```
    bazel-out/darwin_arm64-opt-exec-2B5CBBC6/bin/external/rules_haskell/haskell/ghc_wrapper: line 80: 90734 Killed: 9
                   "${compile_flags[@]}" "${extra_args[@]}" 2>&1
         90736 Done                    | drop_loaded_and_warning 1>&2
    ```
    
    More specifically this happened when trying to add an rpath to a dylib calling the `install_name_tool`, but
    running the same command manually succeeded.
    
    This seems to be caused by mixing different tools from stdenv.cc and darwin.cctools, especially the fact that
    the tools from the latter overwrote tools from the former.
    
    Only add missing tools not provided by the current cc toolchain from the darwin.cctools package instead.
    
    [1]: tweag/rules_haskell#2101
    avdv committed Feb 2, 2024
    Configuration menu
    Copy the full SHA
    dba298e View commit details
    Browse the repository at this point in the history