Skip to content

Commit

Permalink
Fix emranlib on libaom.
Browse files Browse the repository at this point in the history
  • Loading branch information
attilaolah committed Dec 15, 2023
1 parent 73c2c90 commit b11375b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
11 changes: 10 additions & 1 deletion lib/aom/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ package_lib()
cmake_lib(
name = NAME,
build_data = {
"//cond:emscripten": [],
"//cond:emscripten": ["@emscripten//:emranlib"],
"//conditions:default": ["@yasm//:yasm"],
},
cache_entries = cache_entries(
Expand All @@ -27,4 +27,13 @@ cmake_lib(
],
"//conditions:default": [],
}),
env = {
"//cond:emscripten": {"EMRANLIB": "$(execpath @emscripten//:emranlib)"},
"//conditions:default": {},
},
postfix_script = select({
# TODO: Figure out why emar/emranlib is not run!
"//cond:emscripten": "${EMRANLIB} ${INSTALLDIR}/lib/libaom.a",
"//conditions:default": "",
}),
)
2 changes: 1 addition & 1 deletion tools/emscripten/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ ts_project(

genrule(
name = "cmake_toolchain",
outs = ["emscripten_toolchain.cmake"],
srcs = ["@emscripten//:cmake_dir"],
outs = ["emscripten_toolchain.cmake"],
cmd = """\
cat "$(execpath @emscripten//:cmake_dir)/Modules/Platform/Emscripten.cmake" > $@
echo "add_compile_options($$<$$<COMPILE_LANGUAGE:CXX>:-xc++>)" >> $@
Expand Down

0 comments on commit b11375b

Please sign in to comment.