Change toolchain includes (#9318)

This fixes path resolution failures when following `#include_next` directives in headers found from paths in `extra_compiler_flags`.
pull/9321/head
deannagarcia 3 years ago committed by GitHub
parent 911c940569
commit b360b9e388
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      toolchain/BUILD
  2. 5
      toolchain/cc_toolchain_config.bzl

@ -150,8 +150,8 @@ cc_toolchain_config(
bit_flag = "-m32", bit_flag = "-m32",
cpp_flag = "-lstdc++", cpp_flag = "-lstdc++",
extra_compiler_flags = [ extra_compiler_flags = [
"-I/usr/lib/gcc/i686-w64-mingw32/8.3-posix/include/c++", "-isystem/usr/lib/gcc/i686-w64-mingw32/8.3-posix/include/c++",
"-I/usr/lib/gcc/i686-w64-mingw32/8.3-posix/include/c++/i686-w64-mingw32", "-isystem/usr/lib/gcc/i686-w64-mingw32/8.3-posix/include/c++/i686-w64-mingw32",
"-fsjlj-exceptions", "-fsjlj-exceptions",
], ],
extra_include = "/usr/lib/gcc/i686-w64-mingw32/8.3-posix/include", extra_include = "/usr/lib/gcc/i686-w64-mingw32/8.3-posix/include",
@ -171,8 +171,8 @@ cc_toolchain_config(
bit_flag = "-m64", bit_flag = "-m64",
cpp_flag = "-lstdc++", cpp_flag = "-lstdc++",
extra_compiler_flags = [ extra_compiler_flags = [
"-I/usr/lib/gcc/x86_64-w64-mingw32/8.3-posix/include/c++/", "-isystem/usr/lib/gcc/x86_64-w64-mingw32/8.3-posix/include/c++/",
"-I/usr/lib/gcc/x86_64-w64-mingw32/8.3-posix/include/c++/x86_64-w64-mingw32", "-isystem/usr/lib/gcc/x86_64-w64-mingw32/8.3-posix/include/c++/x86_64-w64-mingw32",
], ],
extra_include = "/usr/lib/gcc/x86_64-w64-mingw32/8.3-posix/include", extra_include = "/usr/lib/gcc/x86_64-w64-mingw32/8.3-posix/include",
extra_linker_flags = [ extra_linker_flags = [

@ -134,10 +134,11 @@ def _impl(ctx):
"-Wall", "-Wall",
"-no-canonical-prefixes", "-no-canonical-prefixes",
"--target=" + ctx.attr.target_full_name, "--target=" + ctx.attr.target_full_name,
"-fvisibility=hidden",
] + ctx.attr.extra_compiler_flags + [
"-isystem", "-isystem",
ctx.attr.toolchain_dir, ctx.attr.toolchain_dir,
"-fvisibility=hidden", ],
] + ctx.attr.extra_compiler_flags,
), ),
], ],
), ),

Loading…
Cancel
Save