From 7d260287328a38fbc1430bed56cbdaeaebd58efd Mon Sep 17 00:00:00 2001 From: Oliver Reiche Date: Fri, 2 Dec 2022 15:33:03 +0100 Subject: rules: Refactoring and minor improvements Compared to the previous commit, the action graphs for just and its unit tests are unchanged. - Git hash of action graph for ["",""]: c6e75f17abd7ffaab6ff9bb725ad67ec0bf6c973 - Git hash of action graph for ["test/buildtool","TESTS"]: 8063dfb3dd7daa9ae01d95c177e14946f785c57e Refactor: - "local cflags" to "private-cflags" - "local defines" to "private-defines" - "link externals" to "private-ldflags" - "deps" to "private-deps" for (test) binaries - "proto" to "private-proto" for binaries Improvements: - consistent variable declaration order: OS, ARCH, HOST_ARCH, TARGET_ARCH, CC, CXX, CFLAGS, CXXFLAGS, ADD_CFLAGS, ADD_CXXFLAGS, AR, ENV, PATH - use fields close to their definition (in RULES) - use common expression for binaries and test binaries - split expression "flags" and "compiler" ... to separate ones for CC and CXX. - rename "transition" to "deps-transition" ... to avoid conflicts with other transitions. - support "defaults-transition" for CC expressions Implement: - "cflags" for libraries - "private-cflags" for (test) binaries - "private-defines" for test binaries - "private-ldflags" for test binaries - (public) "defines" for libraries --- test/buildtool/execution_engine/executor/TARGETS | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test/buildtool/execution_engine/executor') diff --git a/test/buildtool/execution_engine/executor/TARGETS b/test/buildtool/execution_engine/executor/TARGETS index 0a825fa5..75f7d385 100644 --- a/test/buildtool/execution_engine/executor/TARGETS +++ b/test/buildtool/execution_engine/executor/TARGETS @@ -8,7 +8,7 @@ { "type": ["@", "rules", "CC/test", "test"] , "name": ["executor"] , "srcs": ["executor.test.cpp"] - , "deps": + , "private-deps": [ ["src/buildtool/common", "artifact_factory"] , ["src/buildtool/execution_api/common", "common"] , ["src/buildtool/execution_engine/dag", "dag"] @@ -23,7 +23,7 @@ , "name": ["local"] , "srcs": ["executor_api_local.test.cpp"] , "data": ["test_data"] - , "deps": + , "private-deps": [ "executor_api_tests" , ["src/buildtool/common", "artifact_factory"] , ["src/buildtool/execution_api/local", "local"] @@ -41,7 +41,7 @@ , "name": ["remote_bazel"] , "srcs": ["executor_api_remote_bazel.test.cpp"] , "data": ["test_data"] - , "deps": + , "private-deps": [ "executor_api_tests" , ["src/buildtool/common", "artifact_factory"] , ["src/buildtool/execution_api/remote", "bazel"] -- cgit v1.2.3