Commit Graph

162 Commits

Author SHA1 Message Date
James Sharpe e24d9cecfe
Allow all source files to be modified in configure_make when using configure_in_place = True (#856) 2022-01-10 09:48:37 +00:00
James Sharpe 44ad191858
Update bazelignore files (#854) 2022-01-06 21:13:25 +00:00
jheaff1 7f8183f205
use rules_perl toolchain for Windows build of OpenSSL (#846)
* use rules_perl toolchain for Windows build of OpenSSL

* Update repositories.bzl

* Update openssl_repositories.bzl

* Update openssl_repositories.bzl

Co-authored-by: UebelAndre <github@uebelandre.com>
2021-12-30 17:07:10 +00:00
UebelAndre aa61b9ad8b
Minor cleanup for examples (#835)
* Remove `BUILD` files from source globs in examples

* Updated example urls
2021-12-30 16:37:31 +00:00
Fabian Meumertzheim 40b03b42eb
Adapt tests to new cc_binary file extension on macOS (#834)
As of https://github.com/bazelbuild/bazel/pull/14369, shared libraries
produced with cc_binary on macOS with the auto-configured toolchain use
the correct file extension for dynamic libraries
(.dylib rather than .so). This requires adapting a test.
2021-12-06 15:50:55 -08:00
Yesudeep Mangalapilly a2f1e5d8c3
Adds toolchain for freebsd. (#794)
* Adds toolchain for freebsd.

* Address buildifier lint warnings.

* Use /usr/bin/env bash

* Leave the Linux-specific shebang alone.

* Adds note about Bazel CI issue requesting for FreeBSD support and experimental status.

* Fix typo.

* Clean up trailing whitespace.

* Updates bazel-skylib version for tests to pass on FreeBSD.

* Update foreign_cc/repositories.bzl

Co-authored-by: UebelAndre <github@uebelandre.com>
2021-11-29 10:54:06 +00:00
Fabian Meumertzheim f61ce5d10b
Pass toolchain and user env variables to make invocation (#777)
* Pass toolchain and user env variables to make invocation

* Rename configure --> make

* Add integration test coverage for make flag passing

This requires making the make_simple Makefile more realistic by

* using CXX and forwarding it to the wrapper;
* using CXXFLAGS instead of CXX_FLAGS and not overwriting its contents.
2021-11-27 07:52:54 -08:00
James Sharpe 7baefc1a8c
Autotools examples (#754)
* Build files for autotools tools
* m4 1.4.19
2021-11-19 00:56:08 +00:00
UebelAndre 83ab86e632
Updated `pcre` example (#809)
* Updated `pcre` example

* Disable failing Bison test
2021-11-17 09:51:25 -08:00
UebelAndre e97f24e701
Updated `bazel_skylib`, `rules_cc` and `rules_python` (#801) 2021-10-19 16:28:21 +00:00
UebelAndre 0ae6a6d75a
Added libgit2 Google mirror (#800) 2021-10-19 08:54:17 -07:00
Daniel Wagner-Hall ec9c9a4612
Expand make variables in env (#788) 2021-10-19 07:51:53 -07:00
UebelAndre 091dc5d381
Updated libgit2 example (#799) 2021-10-18 12:29:00 -07:00
UebelAndre a7105dafb0
Updated `rules_cc` and `bazel_skylib` versions (#795) 2021-09-30 23:34:16 +00:00
Keith Smiley da8952e27c
Fix building for iOS (#767) 2021-08-21 08:55:10 +01:00
jheaff1 776f199f5d
Add log4cxx example to CI (#762)
Co-authored-by: UebelAndre <github@uebelandre.com>
2021-08-18 06:00:17 -07:00
UebelAndre 6d5dbf02f7
Move more example build config into example BUILD files (#763) 2021-08-17 14:05:12 +00:00
jheaff1 4febcea0b6
add expat dep to apr_util build (#750) (#753)
The build of apr_util would previously fail if expat libs and headers
were not preinstalled in the build environment.
2021-08-17 13:19:51 +00:00
jheaff1 f01fd353ee
Build apr for MSVC on Windows (#743) 2021-08-05 19:40:20 +01:00
jheaff1 3b72ab3468
Re-add setting of PREFIX variable in make invocation (#751) 2021-08-03 06:11:07 -07:00
James Sharpe bad4ab0c3d
Fix quoting for cmake (#703) 2021-07-28 18:12:53 +01:00
UebelAndre 3d97bed4a2
Added Google mirrors for new openssl repositories (#738) 2021-07-28 09:00:48 -07:00
UebelAndre bf6d54c470
Updated version of openssl (#737) 2021-07-28 15:46:08 +00:00
jheaff1 5163c3cec8
Build OpenSSL using MSVC toolchain on Windows (#729)
* build OpenSSL using MSVC toolchain on Windows

* Display lib name in progress message

Before this commit, when building OpenSSL using MSVC, the progress
message would display "Building openssl_msvc_".

After this commit, the progess message would display
"Building openssl".

* Add test to verify linkage with OpenSSL libs

* Add test to verify linkage with Curl libs

Note that linker errors occur in applications that link with libssl
and libcrypto if libcrypto comes before libssl on the linker
command-line. Swapping the order of libcrypto and libssl in
BUILD.openssl.bazel resolved the issue.
2021-07-28 08:13:03 -07:00
jheaff1 c7330faee5
Wrap tool paths that contain whitespaces in quotes (#732)
This change is required when using the MSVC toolchain on Windows,
as paths for tools such as the compiler contain whitespaces (e.g.
C:\Program Files\...)

Co-authored-by: UebelAndre <github@uebelandre.com>
2021-07-20 16:44:33 +00:00
James Sharpe a09b0954d4
Add missing includes for std::runtime_error (#728) 2021-07-19 18:40:31 +00:00
UebelAndre 32e222aeff
Enable more examples tests on windows (#718)
* Enable examples tests on windows

* Fixed windows absolute paths being treated as relative.

* Escape windows backslashes for sed replacement

* Improve `//cmake_hello_world_lib/static:libhello` example
2021-07-14 09:37:35 -07:00
jheaff1 93d7c272cc
Build make windows (#716)
* Refactor _env_prelude method to be public (589)

In an upcoming commit, the method will be used to set the PATH,
INCLUDE and LIB environment variables in Windows when building GNU
Make from source

* Build make from source on Windows (#589)

The built_tools_framework.bzl file was modified so that the PATH,
INCLUDE and LIB environment variables are set from the C++ toolchain,
e.g. MSVC.

The PATH environment variable is prepended with the path to the
toolchain's linker, otherwise the MSYS2 linker would be used instead
of MSVC (as they are both named link.exe).
2021-07-12 07:17:18 -07:00
jheaff1 5663d884a2
Provide out_data_dirs attribute (#419) (#622)
This change facilitates hermetic python toolchains, as demonstrated by
the test added in this commit.
2021-06-22 08:51:29 -07:00
UebelAndre 3dbe409720
Removed legacy `*env_vars` attributes from `cmake` and `configure_make` rule (#675)
* Removed legacy `*env_vars` attributes from `cmake` and `configure_make` rule. Use `env` instead.

* Updated examples

* Improved variable expansion

* Fixed missing `build_data` attribute for `configure_make`

* Fix environment variable quotes

* Attempt to address quoted environment variables.

* Updated documentation
2021-06-21 08:24:34 -07:00
UebelAndre 12c3956e5c
Enabled tests from #650 (#682) 2021-06-16 15:35:46 +01:00
UebelAndre 497d929ec5
Added support for replacing sandbox paths in build artifacts (#650)
* Added support for replacing sandbox paths in build artifacts

* Added examples
2021-06-15 15:10:08 -07:00
UebelAndre e1f6efeda3
Updated cares example to stop building targets that aren't outputs (#679) 2021-06-15 10:15:19 -07:00
UebelAndre 3b3960267c
Added `tool_prefix` attribute (#676)
* Added `build_data` attribute and deprecated `additional_inputs`, `additional_tools`, and `tool_deps`.

* Added `tool_prefix` and `configure_prefix` attributes

* Updated examples

* Fixed typo
2021-06-14 16:59:49 +00:00
UebelAndre fb389595d9
Fixed libjpeg turbo example (#678) 2021-06-14 14:55:28 +00:00
UebelAndre 2f13d30e49
Renamed a BUILD file (#662) 2021-06-04 06:50:52 -07:00
Alex Eagle 118c55d424
chore: setup a buildifier pre-commit hook (#661)
Matches the one just landed in rules_apple: 61bc7c01ae
2021-06-03 13:30:26 -07:00
UebelAndre 76198edc79
Fixed dangling symlinks in builds (#656) 2021-06-01 13:59:16 -07:00
UebelAndre 4010620160
Fix RBE by using updated bazel-toolchains version (#654) 2021-05-21 19:40:34 +01:00
UebelAndre 6202e299a6
Moved `configure_use_malloc` example to third party examples (#634) 2021-05-21 09:06:59 -07:00
James Sharpe b136e6c52d
Add config for building with spawn_strategy=standalone (#603)
* Add config for building with spawn_strategy=standalone

* Always build RELEASE configuration to avoid having to select for the output due to change in artifact names for debug builds

* Fix for copy_contents_to_dir and symlink_contents_to_dir on macOS as per #512

* Update name of test files
2021-05-05 17:47:25 -07:00
UebelAndre 98c88de5e0
Deleted unused tests/examples and performed some slight cleanup (#613) 2021-04-23 20:41:42 +01:00
Danny Wolf b6135adb24
Fix string escaping for cmake and configure/make (#567)
* Fix string escaping for cmake and configure/make

Use raw strings where possible to make readability slightly less maddening.

* Example usage of __TIME__

* Allow expansion of environment variables in HEREDOC for cmake crosstool

* Add compile check that __TIME__ is correctly redacted

* Ran buildifier

* Remove comment that is now invalid

Co-authored-by: James Sharpe <james.sharpe@zenotech.com>
2021-04-15 16:44:41 -07:00
UebelAndre 2d98051813
Removed all deprecated attributes (#600)
* Removed all deprecated attributes

* Updated documentation
2021-04-12 15:23:42 +00:00
UebelAndre 2ac3b83c93
Addressed buildifier defects (#599) 2021-04-02 01:45:36 +00:00
James Sharpe 5dbe642ba6
Re-enable configure_with_bazel_transitive test (#586)
* Re-enable configure_with_bazel_transitive test

* Fix simple_lib build for RBE
2021-03-28 15:38:33 -07:00
James Sharpe 0379c97cb6
Built Make toolchains can now be used in RBE (#548)
* Enable more tests for RBE

* Turn off gn build for RBE

* Fix to make_simple example

* Turn off configure_with_bazel_transitive due to an issue with toolchain configuration

* Add CMAKE_MAKE_PROGRAM to generate_args

* Set CMP0074 policy for cmake to use the ZLIB_ROOT entry

* Disable libpng build on rbe

* Disable bison build on RBE

* Disable cmake_android example on RBE

* Fix typo in ZLIB_ROOT

* Reenable libpng build

* Address review comments
2021-03-28 14:01:15 -07:00
UebelAndre 46047ae15c
Set CMAKE_INSTALL_PREFIX to the actual install directory to avoid copy (#575) 2021-03-26 19:31:07 +00:00
UebelAndre bf8c42f883
Ran buildifier (#581) 2021-03-22 08:13:48 -07:00
UebelAndre d4256561fa
Fixed cmake build and target arguments (#573) 2021-03-18 15:35:55 +00:00