Skip to content

Commit

Permalink
Merge branch 'master' into feature/check (#1679)
Browse files Browse the repository at this point in the history
* Move legacy reproducibility test to new setup (#1585)

* Move legacy reproducibility test to new setup

Also included:
1. Adds an LLVM toolchain to the WORKSPACE file that can be used to
manually test changes against clang on linux.
2. Adds os.PathSeparator to stripped absolute paths to be consistent
with stripping being done everywhere else.
3. Adds a test to check the string "bazel-sandbox" in the binary.
4. Uses the cgo binary instead of a pure binary to check for
reproducibility in the go_test.
5. Tags the target "collect_digests" as manual.

To see how binaries are not reproducible with clang and `-g`, use
```
bazel test --copt=-g --crosstool_top=@llvm_toolchain//:toolchain \
  //tests/reproducibility:go_default_test
```

* remove manual tag from reproducibility test

* Do not use debug mode for reproducibility test.

* Update bazel-toolchain to auto detect OS version

* Add a primitive benchmark (#1599)

bazel_benchmark checks out rules_go to a temporary directory, creates
a temporary workspace, measures the time it takes to build various
targets, then appends the times to a .csv file.

This will probably be much more sophisticated in the future, but it's
good to have something basic now.

* go/tools/bazel_benchmark: extract some logic into bash script (#1601)

bazel_benchmark.sh is now responsible for cloning rules_go at master
into a temp directory. This script can be copied to a bin directory
and run with a timer. The rest of the bazel_benchmark.go logic will
run at the tip of master.

Also: record Bazel version in the output file.

* Set Bazel version tested in Travis CI to 0.15.0 (#1604)

* Speed up downloading of @go_googleapis by using http_archive. (#1603)

The googleapis repository seems to be of such a size that it takes a
long time to clone on a link with lower bandwidth. So long, in fact,
that it causes timeouts in my case.

* Use add_all(), add_joined() instead of deprecated functionality of add() (#1602)

* Change crosstool dependency to @bazel_tools//tools/cpp:current_cc_toolchain (#1605)

//tools/defaults is a special case which is being removed in Bazel.

* Add go_sdk rule and GoSDK provider (#1606)

go_sdk is a new rule that gathers information about an SDK and returns
a GoSDK provider which will get wired into the toolchain.

package_list is a new rule that generates a list of importable
packages from the sources in the SDK (previously, we invoked go list,
which is slower).

* Wire go_sdk and go_toolchain together (#1607)

* go_toolchain has a new mandatory attribute, "sdk", which be
  something that provides GoSDK.
* go_host_sdk, go_local_sdk, and go_download_sdk are now macros that
  wrap the old rules. Each rule declares toolchains in its BUILD.bazel
  file that work on the host architecture. The macro calls
  register_toolchains with these.
* go_register_toolchains no longer calls register_toolchains, but it
  will an SDK rule if "go_sdk" isn't defined. This is a step toward
  allowing multiple SDKs to support multiple execution platforms.
* Action inputs are narrowed to use go.sdk.tools and go.stdlib.libs
  rather than larger sets of files.

* stdlib now uses precompiled libraries if the mode is compatible (#1608)

* Remove deprecated --batch flag (#1617)

* Add go_wrap_sdk rule (#1618)

go_wrap_sdk allows you to configure a Go SDK that was downloaded or
located with another repository rule.

Related #1611

* Optimize args and inputs construction (#1610)

* Use add_all() to lazily construct args

* add_joined() omits the argument if value is an empty list

* Optimize compile

* Optimize cover

* Simplify tags argument construction

* Use any() instead of a dict

* Undo depset() usage

* Statically link tool binaries (#1615)

* A few arguments construction cleanups (#1621)

* Update toolchain and provider documentation [skip ci] (#1622)

* Document race, msan and other attributes for go_binary, go_test [skip ci] (#1624)

* Create .bazelrc (#1626)

* Create .bazelrc

See bazelbuild/bazel#5756 (comment)

* Update .bazelrc

* Remove explicit Label() construction (#1627)

attr.label() converts strings into labels by itself.

* Make go_sdk's package_list optional (#1625)

This will eventually be removed when old versions of Gazelle are no
longer supported and nothing depends on the file by name.

If not provided as an input, go_sdk will generate the file itself.

* Update deprecated single_file -> allow_single_file attribute (#1628)

Also remove allow_files where it conflicts with allow_single_file (not
allowed).
Also remove both allow_files and allow_single_file in private attributes
where executable is set to True (a file cannot be specified anyway -
private attribute).

* Document how to avoid proto conflicts [skip ci] (#1631)

Fixes #1548

* Set RULES_GO_VERSION to 0.14.0 (#1633)

* Propagate mode aspect on "_coverdata" edges (#1632)

* Propagate mode aspect on "_coverdata" edges

This ensures the coverdata library is built in the same mode as the
binary that depends on it.

Fixes #1630

* set pure = "on" on test to make CI happy

* Update dependencies (#1634)

bazel_gazelle to master as of 2018-08-06
com_google_protobuf to v3.6.1
com_github_goog_protobuf to v1.1.1
org_golang_x_net to master as of 2018-08-06
org_golang_google_grpc to v1.14.0
org_golang_google_genproto to master as of 2018-08-06
go_googleapis to master as of 2018-08-06
com_github_kevinburke_go_bindata to v3.11.0
org_golang_x_tools to master as of 2018-08-07

* Announce release 0.14.0 [skip ci] (#1636)

Also, fix gazelle example to use prefix directive instead of
attribute.

* Add CI config to test on RBE. (#1638)

* Add CI config to test on RBE.

* Disable BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN.

This is set by default in the rbe_ubuntu1604 platform, but tests in this
repo need this to be disabled.

* Skip tests that are not RBE compatible.

* Use latest release version of bazel-toolchains repo. (#1639)

* Declare org_golang_x_sys in go_rules_dependencies (#1649)

The newest version of gRPC depends on @org_golang_x_sys. Since we
provide other gRPC dependencies, we should declare this one as well.

Fixes #1648

* Document how to override go_rules_dependencies [skip ci] (#1650)

Related #1649

* Update minimum version of Bazel for Travis CI to 0.16.0 (#1651)

Also, remove logic in .travis.yml for downloading Bazel at HEAD. We're
not doing that anymore.

* Actions that use go.args may now use param files automatically (#1652)

Multiple param files are now supported as well.

* Split go.args into go.builder_args and go.tool_args (#1653)

Both helpers enable multiline files. Any action using either of these
helpers should support them. Other actions may use go.actions.args.

go.builder_args adds default arguments that builders should be able to
interpret, including -sdk and -tags.

go.args is deprecated.

* Use -importcfg files for compiling and linking (#1654)

The Go toolchain has supported importcfg files since 1.9. These files
give the build system finer control over dependencies using importmap
and packagefile declarations. Using these files allows us to abandon
-I and -L flags, which will help us stay under command line length
limits.

Fixes #1637

* Update genproto dependencies (#1657)

* update org_golang_google_genproto

* update go_googleapis

* Add test generates long compile/link command lines (#1655)

Related #1637

* Remove 'cfg = "data"' from all attributes (#1658)

The "data" configuration has been deprecated for a while and has no
effect.

* Remove gazelle and its deps from go_rules_dependencies (#1659)

go_rules_dependencies no longer declares the following repositories:

* bazel_gazelle
* com_github_bazelbuild_buildtools
* com_github_pelletier_go_toml

The "gazelle" rule is removed from //go:def.bzl. It has been
deprecated for some time, and "gazelle fix" replaces it.

* Windows: Use absolute and shortened path for GOROOT environment variable (#1647)

* Update tests ahead of Go 1.11 (#1661)

A test in the old version of org_golang_x_crypto we were testing fails
with Go 1.11. This is fixed in newer versions.

* Remove uses of deprecated dictionary concatenation (#1663)

This removes the need for --incompatible_disallow_dict_plus

* Force absolute paths in builders (#1664)

* Update org_golang_x_tools to master as of 2018-08-15 (#1662)

* Set RULES_GO_VERSION to 0.15.0 (#1665)

* Announce release 0.15.0 [skip ci] (#1666)

* one character fix to README boilerplate [skip ci] (#1667)

* doc: fix grammatical error (#1671)
  • Loading branch information
stjj89 authored and jayconrod committed Aug 22, 2018
1 parent 04cadf3 commit 77fcd8b
Show file tree
Hide file tree
Showing 178 changed files with 2,870 additions and 486 deletions.
15 changes: 15 additions & 0 deletions .bazelci/presubmit.yml
Expand Up @@ -15,3 +15,18 @@ platforms:
- "..."
test_targets:
- "..."
rbe_ubuntu1604:
build_targets:
- "..."
test_flags:
# Some tests depend on this feature being disabled. However, because it's
# enabled by default in the rbe_ubuntu1604 platform, we cannot simply remove
# this flag here, we have to explicitly override it with 0.
- "--action_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=0"
test_targets:
- "--"
- "..."
- "-//:vet"
- "-//tests/core/go_path:go_path_test"
- "-//tests/core/stdlib:buildid_test"
- "-@com_github_mattn_go_sqlite3//:go_default_test"
20 changes: 2 additions & 18 deletions .travis.yml
Expand Up @@ -11,7 +11,7 @@ os:
- osx

env:
- V=0.15.0
- V=0.16.0

before_install:
- |
Expand All @@ -21,23 +21,7 @@ before_install:
sysctl kernel.unprivileged_userns_clone=1
OS=linux
fi
if [[ "${V}" == "HEAD" ]]; then
# Determine last successful build number. This may change while we are
# downloading, so it's important to determine ahead of time, in case
# we need to resume the download.
CI_BASE="http://ci.bazel.io/view/Bazel%20bootstrap%20and%20maintenance/job/Bazel/PLATFORM_NAME=${OS}-x86_64/"
CI_INDEX_URL="${CI_BASE}/lastSuccessfulBuild/"
wget -q -O build-index.html "${CI_INDEX_URL}"
CI_BUILD=$(grep '<title>' build-index.html | sed -e 's/^.*#\([0-9]*\).*$/\1/')
# Determine the artifact name. This is normally, bazel--installer.sh,
# but it may be, for example, bazel-0.5rc2-installer.sh before a release.
CI_ARTIFACT=$(grep -o 'bazel-[^\"-]*-installer.sh' build-index.html | head -n 1)
URL="${CI_BASE}/${CI_BUILD}/artifact/output/ci/${CI_ARTIFACT}"
rm build-index.html
else
URL="https://github.com/bazelbuild/bazel/releases/download/${V}/bazel-${V}-installer-${OS}-x86_64.sh"
fi
URL="https://github.com/bazelbuild/bazel/releases/download/${V}/bazel-${V}-installer-${OS}-x86_64.sh"
wget -O install.sh "${URL}"
chmod +x install.sh
./install.sh --user
Expand Down
8 changes: 1 addition & 7 deletions BUILD.bazel
@@ -1,4 +1,4 @@
load("@io_bazel_rules_go//go:def.bzl", "gazelle", "go_path", "go_vet_test")
load("@io_bazel_rules_go//go:def.bzl", "go_path", "go_vet_test")
load("@io_bazel_rules_go//go/private:tools/lines_sorted_test.bzl", "lines_sorted_test")
load("@io_bazel_rules_go//go/private:rules/checker.bzl", "go_checker")
load("@io_bazel_rules_go//go/private:rules/info.bzl", "go_info")
Expand Down Expand Up @@ -31,8 +31,6 @@ go_context_data(
visibility = ["//visibility:public"],
)

# gazelle:prefix github.com/bazelbuild/rules_go

lines_sorted_test(
name = "contributors_sorted_test",
size = "small",
Expand All @@ -49,10 +47,6 @@ lines_sorted_test(
file = "AUTHORS",
)

gazelle(
name = "gazelle",
)

# This could be any file, used as an anchor point for the directory in tests
exports_files(["AUTHORS"])

Expand Down
54 changes: 31 additions & 23 deletions README.rst
Expand Up @@ -16,6 +16,7 @@ Go rules for Bazel_
.. _go_binary: go/core.rst#go_binary
.. _go_test: go/core.rst#go_test
.. _go_download_sdk: go/toolchains.rst#go_download_sdk
.. _go_rules_dependencies: go/workspace.rst#go_rules_dependencies
.. _go_register_toolchains: go/toolchains.rst#go_register_toolchains
.. _go_proto_library: proto/core.rst#go_proto_library
.. _go_proto_compiler: proto/core.rst#go_proto_compiler
Expand All @@ -32,6 +33,7 @@ Go rules for Bazel_
.. _rules_go and Gazelle roadmap: roadmap.rst
.. _Deprecation schedule: deprecation.rst
.. _Avoiding conflicts: proto/core.rst#avoiding-conflicts
.. _Overriding dependencies: go/workspace.rst#overriding-dependencies

.. ;; And now we continue with the actual content
Expand All @@ -46,17 +48,15 @@ Mailing list: `bazel-go-discuss`_
Announcements
-------------

August 16, 2018
Release `0.15.0 <https://github.com/bazelbuild/rules_go/releases/tag/0.15.0>`_
is now available.
August 8, 2018
Release `0.14.0 <https://github.com/bazelbuild/rules_go/releases/tag/0.14.0>`_
is now available.
July 10, 2018
Release `0.13.0 <https://github.com/bazelbuild/rules_go/releases/tag/0.13.0>`_
is now available.
June 12, 2018
Releases `0.12.1 <https://github.com/bazelbuild/rules_go/releases/tag/0.12.1>`_,
`0.11.2 <https://github.com/bazelbuild/rules_go/releases/tag/0.11.2>`_, and
`0.10.5 <https://github.com/bazelbuild/rules_go/releases/tag/0.10.5>`_ are
now available. There will be no major release this month.
May 8, 2018
Release `0.12.0 <https://github.com/bazelbuild/rules_go/releases/tag/0.12.0>`_
is now available.

Contents
--------
Expand All @@ -68,7 +68,7 @@ Documentation
~~~~~~~~~~~~~

* `Core API <go/core.rst>`_

* `go_binary`_
* `go_library`_
* `go_test`_
Expand Down Expand Up @@ -111,7 +111,7 @@ They currently do not support (in order of importance):
* C/C++ interoperation except cgo (swig etc.)
* coverage

:Note: The latest version of these rules (0.13.0) requires Bazel ≥ 0.10.0 to work.
Note: The latest version of these rules (0.15.0) requires Bazel ≥ 0.16.0 to work.

The ``master`` branch is only guaranteed to work with the latest version of Bazel.

Expand All @@ -130,8 +130,8 @@ Setup
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "io_bazel_rules_go",
urls = ["https://github.com/bazelbuild/rules_go/releases/download/0.13.0/rules_go-0.13.0.tar.gz"],
sha256 = "ba79c532ac400cefd1859cbc8a9829346aa69e3b99482cd5a54432092cbc3933",
urls = ["https://github.com/bazelbuild/rules_go/releases/download/0.15.0/rules_go-0.15.0.tar.gz"],
sha256 = "56d946edecb9879aed8dff411eb7a901f687e242da4fa95c81ca08938dd23bb4",
)
load("@io_bazel_rules_go//go:def.bzl", "go_rules_dependencies", "go_register_toolchains")
go_rules_dependencies()
Expand Down Expand Up @@ -179,13 +179,13 @@ build files automatically using gazelle_.
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "io_bazel_rules_go",
urls = ["https://github.com/bazelbuild/rules_go/releases/download/0.13.0/rules_go-0.13.0.tar.gz"],
sha256 = "ba79c532ac400cefd1859cbc8a9829346aa69e3b99482cd5a54432092cbc3933",
urls = ["https://github.com/bazelbuild/rules_go/releases/download/0.15.0/rules_go-0.15.0.tar.gz"],
sha256 = "56d946edecb9879aed8dff411eb7a901f687e242da4fa95c81ca08938dd23bb4",
)
http_archive(
name = "bazel_gazelle",
urls = ["https://github.com/bazelbuild/bazel-gazelle/releases/download/0.13.0/bazel-gazelle-0.13.0.tar.gz"],
sha256 = "bc653d3e058964a5a26dcad02b6c72d7d63e6bb88d94704990b908a1445b8758",
urls = ["https://github.com/bazelbuild/bazel-gazelle/releases/download/0.14.0/bazel-gazelle-0.14.0.tar.gz"],
sha256 = "c0a5739d12c6d05b6c1ad56f2200cb0b57c5a70e03ebd2f7b87ce88cabf09c7b",
)
load("@io_bazel_rules_go//go:def.bzl", "go_rules_dependencies", "go_register_toolchains")
go_rules_dependencies()
Expand All @@ -194,17 +194,15 @@ build files automatically using gazelle_.
gazelle_dependencies()
* Add the code below to the BUILD or BUILD.bazel file in the root directory
of your repository. Replace the string in ``prefix`` with the prefix you
of your repository. Replace the string after ``prefix`` with the prefix you
chose for your project earlier.

.. code:: bzl
load("@bazel_gazelle//:def.bzl", "gazelle")
gazelle(
name = "gazelle",
prefix = "github.com/example/project",
)
# gazelle:prefix github.com/example/project
gazelle(name = "gazelle")
* After adding the ``gazelle`` rule, run the command below:

Expand Down Expand Up @@ -392,7 +390,7 @@ work in some cases.

In some cases, you may want to set the ``goos`` and ``goarch`` attributes of
``go_binary``. This will cross-compile a binary for a specific platform.
This is necessary when you need to produce multiple binaries for different
This is necessary when you need to produce multiple binaries for different
platforms in a single build. However, note that ``select`` expressions will
not work correctly when using these attributes.

Expand Down Expand Up @@ -520,7 +518,7 @@ must be named ``go_sdk``, and it must come *before* the call to
go_register_toolchains()
How do I get information about the Go SDK used by rules_go?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand All @@ -531,3 +529,13 @@ How do I avoid conflicts with protocol buffers?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

See `Avoiding conflicts`_ in the proto documentation.

How do I use a specific version of golang.org/x/sys, net or text?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Several of the golang.org/x repositories are declared in
`go_rules_dependencies`_. We declare these automatically because they're needed
by gRPC.

See `Overriding dependencies`_ for an example of how to replace these
with specific commits.
19 changes: 18 additions & 1 deletion WORKSPACE
@@ -1,13 +1,20 @@
workspace(name = "io_bazel_rules_go")

load("@io_bazel_rules_go//go:def.bzl", "go_rules_dependencies", "go_register_toolchains")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("@io_bazel_rules_go//go:def.bzl", "go_register_toolchains", "go_rules_dependencies")
load("@io_bazel_rules_go//proto:def.bzl", "proto_register_toolchains")

go_rules_dependencies()

go_register_toolchains()

# Needed for tests
http_archive(
name = "bazel_gazelle",
sha256 = "c0a5739d12c6d05b6c1ad56f2200cb0b57c5a70e03ebd2f7b87ce88cabf09c7b",
urls = ["https://github.com/bazelbuild/bazel-gazelle/releases/download/0.14.0/bazel-gazelle-0.14.0.tar.gz"],
)

load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies")

gazelle_dependencies()
Expand Down Expand Up @@ -39,3 +46,13 @@ llvm_toolchain(
name = "llvm_toolchain",
llvm_version = "6.0.0",
)

http_archive(
name = "bazel_toolchains",
sha256 = "c3b08805602cd1d2b67ebe96407c1e8c6ed3d4ce55236ae2efe2f1948f38168d",
strip_prefix = "bazel-toolchains-5124557861ebf4c0b67f98180bff1f8551e0b421",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/archive/5124557861ebf4c0b67f98180bff1f8551e0b421.tar.gz",
"https://github.com/bazelbuild/bazel-toolchains/archive/5124557861ebf4c0b67f98180bff1f8551e0b421.tar.gz",
],
)
28 changes: 14 additions & 14 deletions deprecation.rst
Expand Up @@ -8,12 +8,18 @@ Deprecation schedule
.. _bazelbuild/bazel-bazelle#186: https://github.com/bazelbuild/bazel-gazelle/issues/186

This document lists public interfaces and features that are deprecated and will
be removed soon. For each item in this document, the deprecation rationale is
listed, along with the last supported rules_go release and the release when the
functionality is scheduled to be removed.
be removed soon, as well as features that have already been removed. For each
item in this document, the deprecation rationale is listed, along with the last
supported rules_go release and the release when the functionality is scheduled
to be removed.

Go SDKs
-------
Deprecated features
-------------------

No major features are deprecated right now.

Removed features
----------------

| **Go 1.8**
| **Deprecated in:** 0.12.0
Expand All @@ -24,13 +30,10 @@ Go SDKs
symlinking before compiling.
| **Migration:** ``go_register_toolchains()`` automatically selects the newest
version of Go unless a version is explicitly specified.
Go rules
--------

|
| **rules_go gazelle rule**
| **Deprecated in:** 0.13.0
| **Removed in:** 0.14.0
| **Removed in:** 0.15.0
| **Rationale:** This lets us reduce coupling between rules_go and Gazelle.
With this change, we should be able to remove the automatic dependency
on ``@bazel_gazelle``.
Expand All @@ -47,10 +50,7 @@ Go rules
attributes for several releases. ``go_prefix`` will be removed and
``importpath`` will be mandatory for ``go_library`` and ``go_proto_library``.
| **Migration:** Gazelle_ sets ``importpath`` automatically.
Removed features
----------------

|
| **library attribute**
| **Deprecated in:** 0.9.0
| **Removed in:** 0.12.0
Expand Down
2 changes: 1 addition & 1 deletion go/core.rst
Expand Up @@ -93,7 +93,7 @@ Binaries that depend on this library may also set this value.
name = "cmd",
srcs = ["main.go"],
deps = ["//version:go_default_library"],
x_defs = {"example.com/repo/version.Version", "0.9"},
x_defs = {"example.com/repo/version.Version": "0.9"},
)
Stamping with the workspace status script
Expand Down
6 changes: 1 addition & 5 deletions go/def.bzl
Expand Up @@ -62,10 +62,6 @@ load(
"@io_bazel_rules_go//extras:embed_data.bzl",
"go_embed_data",
)
load(
"@io_bazel_rules_go//go/private:tools/gazelle.bzl",
"gazelle",
)
load(
"@io_bazel_rules_go//go/private:tools/path.bzl",
_go_path = "go_path",
Expand All @@ -89,7 +85,7 @@ load(

# Current version or next version to be tagged. Gazelle and other tools may
# check this to determine compatibility.
RULES_GO_VERSION = "0.14.0"
RULES_GO_VERSION = "0.15.0"

GoLibrary = _GoLibrary
"""See go/providers.rst#GoLibrary for full documentation."""
Expand Down
2 changes: 1 addition & 1 deletion go/private/actions/asm.bzl
Expand Up @@ -35,7 +35,7 @@ def emit_asm(
out_obj = go.declare_file(go, path = source.basename[:-2], ext = ".o")
inputs = hdrs + go.sdk.tools + go.sdk.headers + go.stdlib.libs + [source]

args = go.args(go)
args = go.builder_args(go)
args.add_all([source, "--"])
includes = ([go.sdk.root_file.dirname + "/pkg/include"] +
[f.dirname for f in hdrs])
Expand Down
22 changes: 9 additions & 13 deletions go/private/actions/compile.bzl
Expand Up @@ -23,18 +23,15 @@ load(
"shell",
)

def _importpath(v):
return v.data.importpath

def _searchpath(v):
return v.data.searchpath

def _importmap(v):
return "{}={}".format(v.data.importpath, v.data.importmap)

def _archivefile(v):
return "{}={}".format(v.data.importpath, v.data.file.path)

def _archive(v):
return "{}={}={}".format(v.data.importpath, v.data.importmap, v.data.file.path)

def emit_compile(
go,
sources = None,
Expand All @@ -61,26 +58,25 @@ def emit_compile(
go.sdk.tools + go.stdlib.libs)
outputs = [out_lib]

builder_args = go.args(go)
builder_args = go.builder_args(go)
builder_args.add_all(sources, before_each = "-src")
builder_args.add_all(archives, before_each = "-dep", map_each = _importpath)
builder_args.add_all(archives, before_each = "-arc", map_each = _archive)
builder_args.add_all(["-o", out_lib])
builder_args.add_all(["-package_list", go.package_list])
builder_args.add_all(archives, before_each = "-importmap", map_each = _importmap)
builder_args.add_all(archives, before_each = "-archivefile", map_each = _archivefile)
builder_args.add_all(["-o", out_lib])
builder_args.add_all(["-stdlib", go.toolchain.sdk.root_file.dirname+"/pkg/"+go.toolchain.sdk.goos+"_"+go.toolchain.sdk.goarch])
builder_args.add_all(["-package_list", go.package_list])
if testfilter:
builder_args.add_all(["-testfilter", testfilter])
if go.checker:
builder_args.add_all(["-checker", go.checker.executable])
inputs.append(go.checker.executable)

tool_args = go.actions.args()
tool_args = go.tool_args(go)
if asmhdr:
tool_args.add_all(["-asmhdr", asmhdr])
outputs.append(asmhdr)
tool_args.add_all(archives, before_each = "-I", map_each = _searchpath)
tool_args.add_all(["-trimpath", ".", "-I", "."])
tool_args.add_all(["-trimpath", "."])

#TODO: Check if we really need this expand make variables in here
#TODO: If we really do then it needs to be moved all the way back out to the rule
Expand Down

0 comments on commit 77fcd8b

Please sign in to comment.