cross

command
v0.19.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 4, 2019 License: Apache-2.0 Imports: 1 Imported by: 0

README

Cross compilation
=================

.. _go_binary: /go/core.rst#go_binary

Tests to ensure that cross compilation is working as expected.

.. contents::

cross_test
----------

Tests that cross compilation controlled by the goos and goarch attributes on a go_binary_ produces
executables of the correct type.
This builds binaries using `main.go <main.go>`_ in multiple configurations, and then passes them as data to a
test `written in go <cross_test.go>`_.
The test executes the unix command "file" on the binaries to determine their type, and checks
they were built for the expected architecture.

ios_select_test
---------------

Tests that we can cross-compile a library for iOS. We should be able to select
a dependency using ``@io_bazel_rules_go//go/platform:darwin``, which is true
when building for iOS (tested by ``ios_select_test``) and macOS
(tested by ``use_ios_lib``).

proto_test
----------

Tests that a ``go_proto_library`` can be cross-compiled with ``--platforms``.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL