Skip to content

Commit

Permalink
Switch the toolchain to gcc
Browse files Browse the repository at this point in the history
Summary: This seems to make linking work a lot better.

Reviewed By: arlyon

Differential Revision: D40213769

fbshipit-source-id: 69e824b7aacd03f41a780f5922ef54e38f0fcaff
  • Loading branch information
ndmitchell authored and facebook-github-bot committed Oct 10, 2022
1 parent b08fc91 commit 0e49ce5
Showing 1 changed file with 2 additions and 19 deletions.
21 changes: 2 additions & 19 deletions shim/toolchain.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -40,25 +40,8 @@ def _cxx_toolchain(ctx):
CxxToolchainInfo(
mk_comp_db = ctx.attrs.make_comp_db,
linker_info = LinkerInfo(
linker = RunInfo(args = ["ld"]),
linker_flags = [
"-dynamic-linker",
"/lib64/ld-linux-x86-64.so.2",
"/usr/lib64/crt1.o",
"/usr/lib64/crti.o",
"/usr/lib64/crtn.o",
"-L/usr/lib/gcc/x86_64-redhat-linux/12",
"-lstdc++",
"-lm",
"-lgcc",
"-lc",
] + [
"/usr/lib/gcc/x86_64-redhat-linux/12/crtendS.o",
"/usr/lib/gcc/x86_64-redhat-linux/12/crtbeginS.o",
] if ctx.attrs.link_style == "shared" else [
"/usr/lib/gcc/x86_64-redhat-linux/12/crtend.o",
"/usr/lib/gcc/x86_64-redhat-linux/12/crtbegin.o",
],
linker = RunInfo(args = ["gcc"]),
linker_flags = [],
archiver = RunInfo(args = ["ar", "rcs"]),
type = "gnu",
link_binaries_locally = True,
Expand Down

0 comments on commit 0e49ce5

Please sign in to comment.