Skip to content

Commit

Permalink
fix: missing flags to work on RBE (#47)
Browse files Browse the repository at this point in the history
Signed-off-by: Thulio Ferraz Assis <[email protected]>
  • Loading branch information
f0rmiga authored Jun 21, 2022
1 parent b15575d commit efc23c5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions sysroot/flags.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@ ARCH_AARCH64 = "aarch64"
cflags = [
"-fdiagnostics-color=always",
"-nostdinc",
"-B%workspace%/bin",
]

cxxflags = [
"-fdiagnostics-color=always",
"-nostdinc",
"-nostdinc++",
"-B%workspace%/bin",
]

# buildifier: disable=function-docstring
Expand All @@ -33,6 +35,7 @@ def ldflags(arch, gcc_version):
else:
fail("unknown arch")
return [
"-B%workspace%/bin",
"-B%sysroot%/usr/lib",
"-B%sysroot%/{arch_specific_prefix}{lib}".format(
arch_specific_prefix = arch_specific_prefix,
Expand Down
4 changes: 2 additions & 2 deletions toolchain/defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ def _gcc_toolchain_impl(rctx):
cxx_builtin_include_directories = str(cxx_builtin_include_directories),

# Flags
extra_cflags = str(rctx.attr.extra_cflags),
extra_cxxflags = str(rctx.attr.extra_cxxflags),
extra_cflags = _format_flags(sysroot, toolchain_root, rctx.attr.extra_cflags),
extra_cxxflags = _format_flags(sysroot, toolchain_root, rctx.attr.extra_cxxflags),
extra_ldflags = _format_flags(sysroot, toolchain_root, rctx.attr.extra_ldflags),
includes = str(includes),
))
Expand Down

0 comments on commit efc23c5

Please sign in to comment.