Commit Graph

501 Commits

Author SHA1 Message Date
UebelAndre 0e0d9a26f2
Prefixed all output attributes with `out_` to make their use clearer (#538)
* Prefixed all output attributes with `out_` to make their use clearer

* Updated examples
2021-03-11 17:14:00 +00:00
UebelAndre 43a43353ff
Moved more toolchain related rules into `./toolchains` (#541)
* Moved more toolchain related rules into `./toolchains`

* Updated toolchain locations in rules
2021-03-11 08:52:36 -08:00
James Sharpe c309ec1319
Enable testing on RBE (#525)
* Enable testing on RBE

* Attempting to fix ninja example on RBE

* Disable targets that aren't currently working on RBE
2021-03-09 13:28:28 -08:00
UebelAndre f307e857f6
Renamed `cmake_external` to `cmake` (#539)
* Renamed `cmake_external` rule to `cmake`

* Updated examples
2021-03-09 10:55:01 -08:00
UebelAndre dc49c3716c
Added architecture documentation (#544) 2021-03-09 10:49:13 -08:00
James Sharpe b7c0461a66
Fixes to cmake toolchain so it can find CMAKE_ROOT correctly (#547) 2021-03-09 07:21:10 -08:00
UebelAndre 175b29c6f7
Renamed BUILD files to BUILD.bazel (#540)
* Renamed BUILD files to BUILD.bazel

* Ran Buildifier
2021-03-03 10:08:03 -08:00
James Sharpe 03cd811f50
Fix build_make and enable other built toolchains (#521)
* Don't use deprecated targets for the preinstalled toolchains

* Add option to the repository macro for using built version of the build tools.

* Fix buildifier complaint

* Create BUILD_TMP directory when building make

* Corrections to toolchain setup for make_tool, cmake_tool and ninja_tool

* Fix path to built tools

* Attempting to fix make_tool for RBE

* Disable dependency tracking for make build

* Add cc_toolchain deps

* Add a built_toolchains.bzl file to be able to select the version to build

* Address buildifier issues

* Use geolocated mirror redirect for downloading make srcs

* Update docs
2021-03-02 08:32:31 -08:00
James Sharpe 83a0c2a9b1
Remove deprecated install_ws_dependency rule (#536)
Co-authored-by: UebelAndre <andre.brisco@gmail.com>
2021-03-01 16:04:03 -08:00
James Sharpe b65574690e
Remove deprecated deprecate cc_configure_make rule (#535) 2021-03-01 15:56:32 -08:00
James Sharpe 9e9c65899d
Add sha256 (#534) 2021-03-01 15:14:07 -08:00
James Sharpe 1222c48f98
Indicate we will only be testing 4.0.0 rather than 'requiring' 4.0.0 (#533) 2021-03-01 14:41:25 -08:00
James Sharpe 9ebf3d4d6b
Update README for release (#531)
* Update README for release

* Add additional deprecation

* Remove unused version file

* Update README.md
2021-03-01 11:31:57 -08:00
UebelAndre 354c1dcad8
Reduce noise in build logs (#526)
* Cleaned up build logs

* Fixed noisy echo

* Fixed outdated comment.
2021-03-01 16:22:36 +00:00
UebelAndre fc8efbdf7d
Added `ninja` rule for building Ninja projects (#527)
* Added `ninja` rule for building Ninja projects

* Third party ninja example
2021-03-01 15:46:25 +00:00
UebelAndre c8da0b64e5
Pass cc_toolchain files as tools instead of inputs (#529) 2021-03-01 15:14:20 +00:00
UebelAndre e285764b78
Restructed examples and enabled more testing (#515)
* Reorganized examples

* Documentation

* Third party
2021-02-26 20:21:13 +00:00
James Sharpe 4520018bc2
Make generate_crosstool=True the default for cmake. (#523)
This was previously setting `CMAKE_SYSTEM_NAME` in the generated
toolchain file but setting this explicitly enables `CMAKE_CROSSCOMPILING`
(see https://cmake.org/cmake/help/v3.19/variable/CMAKE_CROSSCOMPILING.html#variable:CMAKE_CROSSCOMPILING)
which breaks projects that use `TRY_RUN`
2021-02-24 14:45:36 -08:00
James Sharpe 0010a50291
Update default cmake to 3.19.6 (#522) 2021-02-24 12:51:09 -08:00
jheaff1 0f8b8c22f1
Preserve timestamps in copy_dir_contents_to_dir (#520) (#520)
This removes the dependency on autotools for projects such as
"make", where autotools are only invoked if the timestamp of certain files
has changed.
2021-02-24 09:24:32 -08:00
UebelAndre 87df6b25f6
Fixed unbound variable in commands and recursive symlinks (#514)
* Fixed unbound variables

* Fixed MacOS recursive symlinks
2021-02-22 20:28:41 +00:00
UebelAndre 5a09829838
Updated documentation (#516) 2021-02-18 22:51:11 -08:00
James Sharpe 9a4435ecab
Attempt to catch shell script errors proactively with 'set -euo pipef… (#500)
* Attempt to catch shell script errors proactively with 'set -euo pipefail'

* Fix up uninitialised variable use

* Fix osx shell function

* Fix to unbound variable in windows commands
2021-02-16 11:55:48 -08:00
UebelAndre dfccdce2c9
Moved some additional examples into the examples directory (#509) 2021-02-16 08:13:25 -08:00
James Sharpe 3be0d3b94e
Move location of generated logs and scripts (#503)
* Don't include log files in default outputs

* Remove logs from install directory

* Rename directory for build script output
2021-02-16 07:58:16 -08:00
UebelAndre 689c96aaa7
Fetch prebuilt cmake and ninja binaries as registered default toolchains (#508)
* Added tooling for generating repositories for pre-built cmake and ninja binaries

* Generated toolchains

* Picked up fix

* Removed toolchains from http_archives and updated generator script

* Regenerated toolchains

* Updated cmake version

* Added additional constraints

* Added option for registering preinstalled toolchains

* MacOS uses universal binaries

* Fixed typo

* More constraints
2021-02-16 15:41:58 +00:00
UebelAndre 80143e7c5a
Updated `master` -> `main` (#504) 2021-02-12 15:05:18 -08:00
UebelAndre da99da47a0
Remove a print from the cleanup function (#501) 2021-02-10 18:33:41 +00:00
Ciarán Connor c6c2e4719f
Fix bash local variable syntax on mac (#424)
Co-authored-by: UebelAndre <andre.brisco@gmail.com>
2021-02-09 18:58:43 -08:00
James Sharpe cf2a0456b8
Remove version from generated script (#499)
* Remove version from generated script

* Rename variable
2021-02-09 13:04:09 -08:00
James Sharpe f77a9e12a3
Propagate defines into CFLAGS and CXXFLAGS passed to the framework (#498)
* Propagate defines into CFLAGS and CXXFLAGS passed to the framework

* Fix flags test

* Add example to test propagation of defines
2021-02-09 12:56:20 -08:00
Attila Oláh 466c32c70f
Build under Bazel sandbox instead of /tmp (#479)
* Build under bazel sandbox instead of /tmp, and remove redundant printf

Build artifacts under /tmp are not cleaned up after a failed build, for
the ease of debugging.  However, this can quickly fill up the /tmp partition
if the build is large.  Build under the sandbox directory instead, and
rely on standard bazel cleanup scheme.

Also remove a print from the cleanup function, which somehow causes empty
newlines to be printed in bazel build output.

* Avoid infinite recursion in symlink_to_dir.

This is a somewhat hackish approach to exclude *.ext_build_deps from
symlinks when creating the symlink forest. This is necessary in cases
where an entire directory is added to the includes, e.g. when setting
includes = ["."] where the directory itself contains a cmake_external()
rule that depends on the very rule containing the includes = ["."].

* Also avoid using a temp directory when bootstrapping make or cmake itself.

* Remove the ##tmpdir## shell toolchain command.

It is no longer necessary now that all its uses are gone.

Co-authored-by: Lauri Peltonen <lape@iki.fi>
2021-02-05 13:29:07 +00:00
UebelAndre 603f3d83d8
Added deprecation notice to `install_ws_dependency` (#496) 2021-02-04 23:12:29 +00:00
UebelAndre 0da08c9714
Added some helpful issue links (#494) 2021-02-04 10:42:02 -08:00
Daniel Wagner-Hall ece188f9ab
Allow setting env vars (#489)
* Allow setting env vars

Also, bring all runfiles of data deps along for execution - currently
data deps which consist of more than one file aren't copied into the
action, which means that they will fail at runtime when they try to use
their runfiles.

* Update docs
2021-02-04 11:59:01 +00:00
James Sharpe 7c4490a2ee
Fix typo in macro arguments (#492) 2021-02-03 12:54:23 -08:00
UebelAndre 743975a998
Fixed incorrect detection of lib_source root (#488)
* Cleanup

* Fixed incorrect detection of lib_source root

* Updated tests
2021-02-03 20:18:43 +00:00
Attila Oláh ce3f53d1b6
Ignore Vim swap files. (#480)
Co-authored-by: UebelAndre <andre.brisco@gmail.com>
2021-02-03 08:47:25 -08:00
UebelAndre 14520d220f
Made buildifier checks more aggressive (#485)
* Made buildifier checks more aggressive

* Ran buildifier to fix all warnings

* Added sorting to cmake script generation and updated tests
2021-02-02 20:09:33 +00:00
Fumitoshi Ukai 78dd474994
support filename containing space (#416)
handle filename containg space.
cmake prebuilt archive contains such filename in docs etc.

also fix symlink to a directory. [ -L "$1" ] returns success
for it, but it would fail "cp $1 $2" as
 cp: -r not specified; omitting directory ...

Fixes: #405, #406

Co-authored-by: UebelAndre <andre.brisco@gmail.com>
2021-01-31 07:43:03 -08:00
Yun Peng 8ae4651929
Fix test target on macOS with Bazel@HEAD (#475)
* Fix test target on macOS with Bazel@HEAD

supports_dynamic_linker feature was removed from cc toolchain for macOS,
cc_binary should be used to build shared library.

Context: bazelbuild/bazel#4341 (comment)

* Fix test on Windows
2021-01-26 17:03:09 +00:00
Wong Heung Sang 4d4acaa112
Fix pkgconfig for configure_make and make (#447)
* Fix pkgconfig for configure_make

* Extract pkgconfig script

* Fix pkgconfig for make

Co-authored-by: James Sharpe <james.sharpe@zenotech.com>
2021-01-25 23:02:05 +00:00
UebelAndre 898bed4efb
Enable Buildifier in CI (#458)
* Added Buildifier check to CI

* Addressed Buildifier lint defects
2021-01-25 22:01:43 +00:00
UebelAndre b72b799413
Updated docs (#473) 2021-01-25 21:59:29 +00:00
UebelAndre d85b575a40
Remove deprecated rules_foreign_cc_utils repo (#470)
* Removed foreign_cc_platform_utils

* Removed rules_foreign_cc_bazel_version

* Update workspace_definitions.bzl

Co-authored-by: James Sharpe <james.sharpe@zenotech.com>
2021-01-25 13:42:14 -08:00
UebelAndre 62672f382a
Updated CI build tag to only user the main branch (#471) 2021-01-25 13:18:52 -08:00
Oliver Tan a70322b054
configure: add autoconf to configure (#432)
We have run into a library that works with autoconf but not autoreconf.
As such, I've introduced a new rule to use autoconf as the build script.
2021-01-25 12:12:52 -08:00
rqssouza 00c274b757
Makes additional_inputs accept targets (#450)
* Makes additional_inputs accept targets

Makes additional_inputs attribute also accept bazel Targets
as inputs, just like lib_source attribute already does.

* Stop checking for input is of type 'Target'

Update the patch so it follows the current code style.
Stop checking if the input is of type 'Target' as additional_inputs
attribute shall accept just 'Target' type.
Fix the same issue in additional_tools attribute.
2021-01-25 19:14:15 +00:00
UebelAndre 9b6a8f675c
Add tests for checking the minimum supported version to CI (#469) 2021-01-25 19:07:05 +00:00
UebelAndre 08e8c6c93d
Moved example dependencies into loadable bzl files (#467)
* Sorted dependencies

* Added rules_android repository to satisfy buildifier defects

* Added rules_cc repository to satisfy buildifier defects

* Ran Buildifier
2021-01-25 08:04:52 -08:00