Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
jheaff1 committed Feb 20, 2023
1 parent 6e22a86 commit 02593b9
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/ci.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ build --repository_cache=~/.cache/bazel-repo
test --test_output=errors
# Allows tests to run bazelisk-in-bazel, since this is the cache folder used
test --test_env=XDG_CACHE_HOME

build --incompatible_strict_action_env
test --incompatible_strict_action_env
7 changes: 6 additions & 1 deletion NOTES
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,9 @@ have requirements.txt in rules_qt repo, not e2e, and call the pip repo rules_qt_
replacement of "-config" files breaks llvm-config, see https://github.com/bazelbuild/rules_foreign_cc/pull/109. commit bf2cb01
llvm-config --ldflags will refer to an old sandbox. This was solved for libpng and freetype by replacing the -config file, but they were ascii scripts, not executables! could use it if no-sandbox for llvm build, but try mesa without llvm-config

could try to change replace_in_files to only do so if "file <file>" result contains "ascii"
could try to change replace_in_files to only do so if "file <file>" result contains "ascii"

Add the following to Bazel rc and use Bazel 6.0 to see if it prevents llvm being built twice - https://github.com/bazelbuild/bazel/issues/14023#issuecomment-1325718022

See if qt cmake variable can be set to not build the docs and therefore not require llvm

6 changes: 6 additions & 0 deletions e2e/workspace/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ local_repository(
path = "../..",
)

# (copied from https://github.com/tensorflow/tensorflow/blob/58e320bee974240b4193ffe7da7bc1cc1c43a551/WORKSPACE#L5)
# The cascade of load() statements and rules_qt_dependencies?() calls works around the
# restriction that load() statements need to be at the top of .bzl files.
# E.g. we can not retrieve a new repository with http_archive and then load()
# a macro from that repository in the same file.

load("@rules_qt//qt:repositories.bzl", "rules_qt_dependencies")

rules_qt_dependencies(qt_version = "6.2.4")
Expand Down
2 changes: 1 addition & 1 deletion qt/repositories3.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def rules_qt_dependencies3():
)

pip_parse(
name = "pip",
name = "rules_qt_pip",
python_interpreter_target = py3_interpreter,
requirements_lock = "//:requirements_lock.txt",
)
2 changes: 1 addition & 1 deletion qt/repositories4.bzl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Run dependency workspace macros"""

load("@pip//:requirements.bzl", "install_deps")
load("@rules_qt_pip//:requirements.bzl", "install_deps")

def rules_qt_dependencies4():
install_deps()
Expand Down
4 changes: 2 additions & 2 deletions third_party/llvm/BUILD.llvm.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ cmake(
# "llvm-config",
],
# TODO remove
build_args=["-j4"],
tags = ["no-sandbox"],
build_args=["-j6"],
# tags = ["no-sandbox"],
out_data_dirs = ["lib"], # required as clang-tidy needs the lib folder, which contains system includes like stddef.h
targets = [
# "install-clang-format-stripped",
Expand Down
2 changes: 1 addition & 1 deletion third_party/mesa/BUILD.mesa.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
load("@pip//:requirements.bzl", "requirement")
load("@rules_qt_pip//:requirements.bzl", "requirement")
load("@rules_foreign_cc//foreign_cc:defs.bzl", "meson_with_requirements")

filegroup(
Expand Down
1 change: 1 addition & 0 deletions third_party/qt/BUILD.qt.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ cmake(
"@nodejs_toolchains//:resolved_toolchain"
],
deps = [
# TODO this caused llvm rebuild even after building llvm for mesa. probably because meson_with_requirements transition affects deps. See if i can change it to be an incoming transition, not outgoing
"@llvm",
"@mesa",
"@openssl",
Expand Down

0 comments on commit 02593b9

Please sign in to comment.