Run buildifier on bazel/ (#913)

This commit is contained in:
Kevin Lubick
2021-10-19 15:56:55 -04:00
committed by GitHub
parent 773e4f955d
commit f8615b4782
9 changed files with 33 additions and 30 deletions

View File

@@ -1,4 +1,4 @@
package(default_visibility = ['//visibility:public']) package(default_visibility = ["//visibility:public"])
config_setting( config_setting(
name = "linux", name = "linux",
@@ -41,4 +41,3 @@ alias(
":windows": "@emscripten_npm_win//:node_modules", ":windows": "@emscripten_npm_win//:node_modules",
}), }),
) )

View File

@@ -1,7 +1,9 @@
workspace(name = "emsdk") workspace(name = "emsdk")
load(":deps.bzl", "deps") load(":deps.bzl", "deps")
deps() deps()
load(":emscripten_deps.bzl", "emscripten_deps") load(":emscripten_deps.bzl", "emscripten_deps")
emscripten_deps() emscripten_deps()

View File

@@ -9,7 +9,7 @@ def emscripten_deps(emscripten_version = "latest"):
version = emscripten_version version = emscripten_version
if version == "latest": if version == "latest":
version = reversed(sorted(EMSCRIPTEN_TAGS.keys(), key=_parse_version))[0] version = reversed(sorted(EMSCRIPTEN_TAGS.keys(), key = _parse_version))[0]
if version not in EMSCRIPTEN_TAGS.keys(): if version not in EMSCRIPTEN_TAGS.keys():
error_msg = "Emscripten version {} not found.".format(version) error_msg = "Emscripten version {} not found.".format(version)

View File

@@ -9,9 +9,9 @@ filegroup(
"emcc.sh", "emcc.sh",
"emscripten_config", "emscripten_config",
"env.sh", "env.sh",
"@nodejs//:node_files",
"@emsdk//:binaries", "@emsdk//:binaries",
"@emsdk//:node_modules", "@emsdk//:node_modules",
"@nodejs//:node_files",
], ],
) )

View File

@@ -437,7 +437,6 @@ def _impl(ctx):
# https://emscripten.org/docs/debugging/Sanitizers.html # https://emscripten.org/docs/debugging/Sanitizers.html
feature(name = "wasm_asan"), feature(name = "wasm_asan"),
feature(name = "wasm_ubsan"), feature(name = "wasm_ubsan"),
feature( feature(
name = "output_format_js", name = "output_format_js",
enabled = True, enabled = True,
@@ -518,7 +517,7 @@ def _impl(ctx):
# Language Features # Language Features
flag_set( flag_set(
actions = all_cpp_compile_actions, actions = all_cpp_compile_actions,
flags = ["-std=gnu++17", "-nostdinc", "-nostdinc++",], flags = ["-std=gnu++17", "-nostdinc", "-nostdinc++"],
), ),
# Emscripten-specific settings: # Emscripten-specific settings:
@@ -910,7 +909,8 @@ def _impl(ctx):
"-iwithsysroot" + "/include/c++/v1", "-iwithsysroot" + "/include/c++/v1",
"-iwithsysroot" + "/include/compat", "-iwithsysroot" + "/include/compat",
"-iwithsysroot" + "/include", "-iwithsysroot" + "/include",
"-isystem", emscripten_dir + "/lib/clang/14.0.0/include", "-isystem",
emscripten_dir + "/lib/clang/14.0.0/include",
], ],
), ),
# Inputs and outputs # Inputs and outputs
@@ -1103,7 +1103,7 @@ emscripten_cc_toolchain_config_rule = rule(
implementation = _impl, implementation = _impl,
attrs = { attrs = {
"cpu": attr.string(mandatory = True, values = ["asmjs", "wasm"]), "cpu": attr.string(mandatory = True, values = ["asmjs", "wasm"]),
"em_config": attr.label(mandatory = True, allow_single_file=True), "em_config": attr.label(mandatory = True, allow_single_file = True),
"emscripten_binaries": attr.label(mandatory = True), "emscripten_binaries": attr.label(mandatory = True),
}, },
provides = [CcToolchainConfigInfo], provides = [CcToolchainConfigInfo],

View File

@@ -4,7 +4,9 @@ local_repository(
) )
load("@emsdk//:deps.bzl", "deps") load("@emsdk//:deps.bzl", "deps")
deps() deps()
load("@emsdk//:emscripten_deps.bzl", "emscripten_deps") load("@emsdk//:emscripten_deps.bzl", "emscripten_deps")
emscripten_deps() emscripten_deps()