Skip to content

Commit

Permalink
Merge pull request #9628 from protocolbuffers/windowsSysroot
Browse files Browse the repository at this point in the history
Removing toolchain_dir variable
  • Loading branch information
deannagarcia committed Mar 15, 2022
2 parents 7ecf43f + 202ec9e commit 178ebc1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
14 changes: 3 additions & 11 deletions toolchain/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ cc_toolchain_config(
target_cpu = "aarch64",
target_full_name = "aarch64-linux-gnu",
toolchain_name = "linux_aarch_64",
# Don't really need this, setting it because it's required.
toolchain_dir = "/opt/manylinux/2014/aarch64",
)

cc_toolchain_config(
Expand All @@ -60,7 +58,6 @@ cc_toolchain_config(
sysroot = "/opt/manylinux/2014/ppc64le",
target_cpu = "ppc64",
target_full_name = "powerpc64le-linux-gnu",
toolchain_dir = "/opt/manylinux/2014/ppc64le",
toolchain_name = "linux_ppcle_64",
)

Expand All @@ -72,7 +69,6 @@ cc_toolchain_config(
sysroot = "/opt/manylinux/2014/s390x",
target_cpu = "systemz",
target_full_name = "s390x-linux-gnu",
toolchain_dir = "/opt/manylinux/2014/s390x",
toolchain_name = "linux_s390_64",
)

Expand All @@ -84,7 +80,6 @@ cc_toolchain_config(
sysroot = "/opt/manylinux/2014/i686",
target_cpu = "x86_32",
target_full_name = "i386-linux-gnu",
toolchain_dir = "/opt/manylinux/2014/i686",
toolchain_name = "linux_x86_32",
)

Expand All @@ -96,7 +91,6 @@ cc_toolchain_config(
sysroot = "/opt/manylinux/2014/x86_64",
target_cpu = "x86_64",
target_full_name = "x86_64-linux-gnu",
toolchain_dir = "/opt/manylinux/2014/x86_64",
toolchain_name = "linux_x86_64",
)

Expand All @@ -113,7 +107,6 @@ cc_toolchain_config(
sysroot = "/usr/tools/apple_sdks/xcode_13_0/macosx",
target_cpu = "aarch64",
target_full_name = "aarch64-apple-macosx11.3",
toolchain_dir = "/usr/tools/apple_sdks/xcode_13_0/macosx",
toolchain_name = "osx_aarch_64",
)

Expand All @@ -130,7 +123,6 @@ cc_toolchain_config(
sysroot = "/usr/tools/apple_sdks/xcode_13_0/macosx",
target_cpu = "x86_64",
target_full_name = "x86_64-apple-macosx11.3",
toolchain_dir = "/usr/tools/apple_sdks/xcode_13_0/macosx",
toolchain_name = "osx_x86_64",
)

Expand All @@ -143,15 +135,15 @@ cc_toolchain_config(
"-isystem/usr/lib/gcc/i686-w64-mingw32/8.3-posix/include/c++/i686-w64-mingw32",
"-fsjlj-exceptions",
],
extra_include = "/usr/lib/gcc/i686-w64-mingw32/8.3-posix/include",
extra_include = "/usr/lib/gcc/i686-w64-mingw32",
extra_linker_flags = [
"-L/usr/lib/gcc/i686-w64-mingw32/8.3-posix",
"-pthread",
],
linker_path = "/usr/bin/ld",
sysroot = "/usr/i686-w64-mingw32",
target_cpu = "x86_32",
target_full_name = "i686-w64-mingw32",
toolchain_dir = "/usr/i686-w64-mingw32/include",
toolchain_name = "i686-w64-mingw32",
)

Expand All @@ -168,8 +160,8 @@ cc_toolchain_config(
"-L/usr/lib/gcc/x86_64-w64-mingw32/8.3-posix",
],
linker_path = "/usr/bin/ld",
sysroot = "/usr/x86_64-w64-mingw32",
target_cpu = "x86_64",
target_full_name = "x86_64-w64-mingw32",
toolchain_dir = "/usr/x86_64-w64-mingw32/include",
toolchain_name = "x86_64-w64-mingw32",
)
5 changes: 2 additions & 3 deletions toolchain/cc_toolchain_config.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def _impl(ctx):
"-fvisibility=hidden",
] + ctx.attr.extra_compiler_flags + [
"-isystem",
ctx.attr.toolchain_dir,
ctx.attr.sysroot,
],
),
],
Expand All @@ -160,7 +160,7 @@ def _impl(ctx):
ctx = ctx,
compiler = "clang",
cxx_builtin_include_directories = [
ctx.attr.toolchain_dir,
ctx.attr.sysroot,
ctx.attr.extra_include,
"/usr/local/include",
"/usr/local/lib/clang",
Expand All @@ -187,7 +187,6 @@ cc_toolchain_config = rule(
"sysroot": attr.string(mandatory = False),
"target_cpu": attr.string(mandatory = True, values = ["aarch64", "ppc64", "systemz", "x86_32", "x86_64"]),
"target_full_name": attr.string(mandatory = True),
"toolchain_dir": attr.string(mandatory = True),
"toolchain_name": attr.string(mandatory = True),
},
provides = [CcToolchainConfigInfo],
Expand Down

0 comments on commit 178ebc1

Please sign in to comment.