aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/cpp/osx_cc_configure.bzl
Commit message (Collapse)AuthorAge
* Format all bzl files with buildifierGravatar vladmos2018-06-01
| | | | | | This CL aslo enables a presubmit check for correct formatting of all bzl files in //third_party/bazel. PiperOrigin-RevId: 198857055
* Minimize the cost of Skyframe restarts during CC autoconfiguration.Gravatar jmmv2018-05-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Repository functions restart whenever they have to resolve a label due to the way Skyframe currently works. This is problematic because such functions are often costly: they try to detect features of the host system by building and running tools, and they touch the file system. To minimize the cost of these restarts, which are unavoidable, resolve the paths to all necessary labels upfront. This way, while the restarts still happen, they have no side-effects and thus are cheap. As a side-effect of this work, remove the strange and undocumented "tpl" function, which only made things more cryptic and harder to refactor. This cuts down Bazel's own analysis time on macOS on my Mac Pro 2013 from 14 seconds to 6 seconds by trimming about 15 unnecessary rebuilds and executions of the xcode-locator-bin tool to just 1. In other words: one fewer awkward pause during analysis time. Additionally, there is the hope that this will fix the problems users observe where Bazel writes persistent garbage during autoconfiguration (needing "clean --expunge" to recover) when Visual Studio Code is running and Santa is enabled on macOS; see https://github.com/bazelbuild/bazel/issues/4603. This is most likely a bug in Santa (see https://github.com/google/santa/issues/260) but we were tickling it due to our apparently-abusive behavior of building, executing, and then removing the same thing over and over again. Fixes https://github.com/bazelbuild/bazel/issues/5196 and should also fix https://github.com/bazelbuild/bazel/issues/4603. RELNOTES: None. PiperOrigin-RevId: 198434395
* Detect build-in include directories for C and C++, not only for C++Gravatar hlopko2018-04-25
| | | | | | | Ping #3977 RELNOTES: None PiperOrigin-RevId: 194240625
* Converts wrapped_clang from a bash script to a C++ source file which is ↵Gravatar kaipi2018-02-06
| | | | | | | | | | | | compiled as part of bazel's repository bootstrap. This should make crosstool's clang invocations faster. An added benefit of this is that wrapped_clang.cc supports the "DSYM_HINT" flags specified through the CROSSTOOL, so with this change, apple_binary gets support for the --apple_generate_dsym flag. The dSYM generation issue has been flagged multiple times: https://github.com/bazelbuild/bazel/issues/4312 https://github.com/bazelbuild/bazel/issues/3940 https://github.com/bazelbuild/bazel/issues/3372 RELNOTES: apple_binary can now generate dSYM outputs with the --apple_generate_dsym=true flag. PiperOrigin-RevId: 184688215
* Make cc_configure script more extensibleGravatar Ilya Biryukov2017-12-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds a few extension points to cc_configure script with the ultimate goal to allow downloading the compiler and other tools used for C++ build before generating the crosstool. Specifically, we make the following changes: - Expose the implementation of a cc_autoconf repository rule under a name of cc_autoconf_impl. - Extend cc_autoconf_impl to allow overriding paths to build tools (i.e. compilers, linkers, etc.) - Allow to put any extra artifacts into the generated crosstool repository. All files inside 'extra_tools' folder are added into compiler_files, all_files and linker_files properties of the generated crosstool, so that they are available for the crosstool. With these extension one can do the following to download the compilers used for the build and configure the crosstool: - Create a repository_rule for the toolchain with a custom implementation. - In the implementation function of the repository rule: + Download the compilers and put them into `extra_tools` folder. + Run cc_autoconf_impl with overriden_tools set to relative paths of the compiler and other build tools in the extra_tools folder. Change-Id: I51af6b504578963b3e97bcdd1ccb6d0a5fed1c3e PiperOrigin-RevId: 179675911
* Refactor cc_configure.bzlGravatar Yun Peng2017-06-22
Split original cc_configure.bzl into 4 different files: lib_cc_configure.bzl: base library for C++ toolchain configuration unix_cc_configure.bzl: For Unix platforms osx_cc_configure.bzl: For macOS windows_cc_configure.bzl: For Windows Change-Id: I76fa44294c6ca4304f0a94f3a1c57d6e76141667 PiperOrigin-RevId: 159801973