aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/osx
Commit message (Collapse)AuthorAge
* Add objc-fully-link to the list of actions that require the apple_env ↵Gravatar kaipi2018-08-06
| | | | | | feature. This fixes apple_static_library functionality. PiperOrigin-RevId: 207625792
* Use a parameterized dict and simplify an iteration in xcode-locator.Gravatar jmmv2018-08-01
| | | | | | | | | | | This raises the minimum version with which xcode-locator must be built to Xcode 7. Changes suggested by davg@ during the review of another change to the xcode-locator. RELNOTES: None. PiperOrigin-RevId: 206949696
* Add extra logging to xcode-locator when scanning Xcode bundles.Gravatar jmmv2018-08-01
| | | | | RELNOTES: None. PiperOrigin-RevId: 206933729
* Break out xcode-locator's main function into smaller chunks.Gravatar jmmv2018-07-31
| | | | | | | | | This is intended to be a refactoring without functional changes for my own sanity in understanding what this code does. Except I couldn't avoid applying some visual improvements to the usage message. RELNOTES: None. PiperOrigin-RevId: 206771539
* Send xcode-locator error messages to stderr, not stdout.Gravatar jmmv2018-07-26
| | | | | RELNOTES: None. PiperOrigin-RevId: 206224046
* Cut long lines in xcode-locator.m.Gravatar jmmv2018-07-26
| | | | | | | This is just a style fix so it should have no functional changes. RELNOTES: None. PiperOrigin-RevId: 206220348
* Add new debug_prefix_map_pwd_is_dot CROSSTOOL featureGravatar Googler2018-07-25
| | | | | | | | | | | | This feature sets `-fdebug_prefix_map=$PWD=.` as an argument to Clang in order to standardize the paths to debug symbols (by making them relative to the exec root). Note that this needs to be implemented inside wrapped_clang instead of as an argument to the action itself for caching purposes, as PWD can change based on the action's executor. PiperOrigin-RevId: 206019016
* Revert "Support RAII in wrapped_clang"Gravatar bbaren2018-07-17
| | | | | | | | | | | This reverts commit 202658759, which does not correctly propagate Clang error codes. PiperOrigin-RevId: 204991287 Notes: The commit message should begin "This reverts commit f24958a11e3a54f563429aadc12bce033be047fa ...".
* Prepare CROSSTOOL for dSYM simplificationGravatar Googler2018-07-10
| | | | | | | | Currently dSYM information is propagated using a zip file emitted by the linking action which contains a dwarf file and plist. A second action then unzips said file, discards the plist and propagates the dwarf file. This CL is part of a change which makes the link action emit the dwarf file directly. This change adds logic to the CROSSTOOL and wrapped_clang to temporarily support both the old and new approaches using the presence of DSYM_HINT_DSYM_BUNDLE_ZIP as a signal as to which to use. After this change the new (and temporary) CROSSTOOL feature no_dsym_create_zip will allow suppressing DSYM_HINT_DSYM_BUNDLE_ZIP from being passed. Once the migration is complete we will remove both the signal variable and feature. PiperOrigin-RevId: 203954795
* Automatic code cleanup.Gravatar cushon2018-07-06
| | | | PiperOrigin-RevId: 203454459
* Support RAII in wrapped_clangGravatar Googler2018-06-29
| | | | | | | | | If a program `abort`s, `exit`s, or `exec`s a different program, destructors won't run. To allow RAII in wrapped_clang, remove all its `abort` and `exec` calls. `main` is now the single exit point for the program, and destructors will always run after `main` returns. PiperOrigin-RevId: 202658759
* Remove support for header preprocessingGravatar hlopko2018-06-26
| | | | | | | This was never used. We thought it will be useful, but it's not. RELNOTES: None. PiperOrigin-RevId: 202143524
* Change -lgcov with --coverageGravatar elenairina2018-06-15
| | | | | | | in Bazel osx CROSSTOOL. -lgcov is not supported on macOS. See #5128. RELNOTES: None. PiperOrigin-RevId: 200691758
* CROSSTOOLS wrapped_clang: handle spaces in pathsGravatar Oscar Bonilla2018-06-12
| | | | | | | | | | | | | | | | When bazel calls wrapped_clang, it single-quotes all arguments. However it passes flags with arguments quoted as a whole. That is, wrapped_clang will be called with arguments like these: wrapped_clang '-isysroot /a/path/with spaces' '/a/file with spaces.m' Before this commit, wrapped_clang was blindly splitting on space and calling clang with invalid arguments. Now it only splits on the _first_ space, and only if the argument starts with '-'. Closes #5147. PiperOrigin-RevId: 200259496
* Don't rely on shell splitting; explicitly make these multiple argumentsGravatar ulfjack2018-06-05
| | | | | | One step towards #5147. PiperOrigin-RevId: 199281558
* 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
* Split user_link_flags from legacy_link_flagsGravatar hlopko2018-05-16
| | | | | | | | The difference between them is that user_link_flags will stay after we remove legacy fields from the crosstool. RELNOTES: None. PiperOrigin-RevId: 196940832
* Replace use of output_object_file with output_file in CROSSTOOLS.Gravatar hlopko2018-05-16
| | | | | RELNOTES: None. PiperOrigin-RevId: 196870840
* Remove unused fields from osx crosstoolGravatar hlopko2018-04-16
| | | | | | | Bazel doesn't use them anyway. RELNOTES: None PiperOrigin-RevId: 193010433
* Remove c++-link-interface-dynamic-library from crosstools, it's not usedGravatar hlopko2018-04-05
| | | | | RELNOTES: None. PiperOrigin-RevId: 191713379
* Add toolchain definitions for autoconfigured cc_toolchain entries.Gravatar jcater2018-03-27
| | | | PiperOrigin-RevId: 190611069
* Remove global_whole_archive_open feature from osx crosstoolsGravatar hlopko2018-03-27
| | | | | | | Build variable global_whole_archive is not exposed in bazel anymore. RELNOTES: None PiperOrigin-RevId: 190598137
* Unify action_configs for static librariesGravatar hlopko2018-03-12
| | | | | | | | | | | We don't need to separate them into 4 different flavours, all crosstools define them identically anyway. RELNOTES: CppRules: Unified action_configs for static libraries From now on only c++-link-static-library is read. PiperOrigin-RevId: 188726352
* Introduce a specific action_config for linking nodeps dynamic librariesGravatar hlopko2018-03-01
| | | | | | | | | | | | | With this cl toolchain author can specify different flags for linking shared library produced by cc_library and a shared library produced by cc_binary. This is what is needed to remove linking_mode_flags - MOSTLY_STATIC_LIBRARIES from the crosstool. What this linking mode was used for was to separate when we link transitive shared library from cc_binary and when we link this little-and-not-really-useful-outside-of-bazel nodeps shared library in cc_library. RELNOTES: CcToolchain: Introduced action_config for "c++-link-transitive-dynamic-library" PiperOrigin-RevId: 187523334
* Put @loader_path, not $ORIGIN into rpath flags on macGravatar hlopko2018-02-23
| | | | | | Fixes 4480. RELNOTES: None. PiperOrigin-RevId: 186774229
* Automated rollback of commit c7e343ad314aeab6283b5939bc8126a112140a11.Gravatar plf2018-02-16
| | | | | | | | | | | | | | | *** Reason for rollback *** Rolling back after having come up with a more principled solution in b/73047818 that will add a more generic attribute called additional_linker_inputs so that users can depend on any file of any type and reference it from linkopts. *** Original change description *** C++: Allows adding linkopts through file. The file can be generated during execution by a different rule. RELNOTES:none PiperOrigin-RevId: 185977745
* Fix CROSSTOOL.tpl to correctly target watchos_i386.Gravatar kaipi2018-02-13
| | | | PiperOrigin-RevId: 185556666
* C++: Allows adding linkopts through file.Gravatar plf2018-02-12
| | | | | | | The file can be generated during execution by a different rule. RELNOTES:none PiperOrigin-RevId: 185361140
* Introduce -c source_file -o output_file build variablesGravatar hlopko2018-02-08
| | | | | | | | | | | | | | Prior to this cl CompileCommandLine would (almost) unconditionally emit -c and -o flags. This cl removes this logic and relies on crosstool to emit these flags. This is another small step towards platform independent C++ rules. Memory use is not affected, since the build variables used by this cl are already exposed, this cl just forces crosstools to use it. Encore of https://github.com/bazelbuild/bazel/commit/f26e8694ae78599b3e2004e3360eaf3443fa53a6. RELNOTES: None. PiperOrigin-RevId: 184981106
* 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
* Migrate uses of xcode_config_alias to use the recently-introduced skylark ↵Gravatar cparsons2017-12-20
| | | | | | | late bound default instead. RELNOTES: None. PiperOrigin-RevId: 179738235
* Add two action types to the list of those requiring apple_envGravatar cparsons2017-12-18
| | | | | | | These two action types, 'linkstamp-compile' and 'c++-link-interface-dynamic-library', require use of the wrapped_clang tool, which requires apple_env to be set. RELNOTES: None. PiperOrigin-RevId: 179475470
* Fix some broken targets and failing tests.Gravatar ajmichael2017-12-06
| | | | | RELNOTES: None PiperOrigin-RevId: 178099410
* Remove `-R` flags from the MacOS crosstool template.Gravatar John Millikin2017-12-04
| | | | | | | | Fixes https://github.com/bazelbuild/bazel/issues/4028 Closes #4029. PiperOrigin-RevId: 177813419
* Remove uses of ar_flag and uses_action_config_for_arGravatar hlopko2017-11-23
| | | | | | | Bazel is not reading its value anyway. RELNOTES: None PiperOrigin-RevId: 176768851
* Remove bazel's --experimental_skip_static_outputs option.Gravatar Googler2017-11-10
| | | | | | | | | | | It was added long ago, for reasons which are no longer relevant or useful. Also remove the build variable it controlled ("skip_mostly_static") from CROSSTOOL files. RELNOTES: None. PiperOrigin-RevId: 175325225
* Adds "-fno-autolink" to ObjC compilation actions to avoid using the autolink ↵Gravatar kaipi2017-10-27
| | | | | | feature, as it doesn't play very well with bazel's deduplication of shared dependencies. PiperOrigin-RevId: 173531808
* Automated rollback of commit e9b10399f6a148a3d20442f2c5020b05fa891873.Gravatar twerth2017-10-24
| | | | | | | | | | | | *** Reason for rollback *** Breaks ~2k ios targets, see b/68179560 *** Original change description *** Move hard-coded compilation-mode-specific flags in ObjcConfiguration. PiperOrigin-RevId: 173239463
* Move hard-coded compilation-mode-specific flags in ObjcConfiguration.Gravatar cpeyser2017-10-23
| | | | PiperOrigin-RevId: 172932367
* Minor update to a docstring.Gravatar lberki2017-10-23
| | | | | RELNOTES: None. PiperOrigin-RevId: 172880849
* Strip Xcode versions like "9.0gm" for the version flag.Gravatar lberki2017-10-20
| | | | | | | Turns out, those exist. RELNOTES: None. PiperOrigin-RevId: 172768102
* Add Skylark code that exports the current Xcode version and the Apple SDK ↵Gravatar lberki2017-10-18
| | | | | | | | | | | versions as flags. This will serve to replace AppleConfiguration#lateBoundOptionDefaults(). That one has to go away so that AppleConfiguration doesn't need to know the contents of the xcode_config rule anymore. Progress towards #3424. RELNOTES: None. PiperOrigin-RevId: 172569961
* Use FeatureConfiguration to compute linkstamping compile command lineGravatar hlopko2017-09-25
| | | | | | | | | Before, linkstamping compile actions were hardcoded in bazel and assumed gcc/clang and bash. This cl removes gcc/clang assumptions by using feature configuration. RELNOTES: None. PiperOrigin-RevId: 169685949
* This time for sure: stop using --undefined dynamic_lookup in osx linking.Gravatar Googler2017-09-21
| | | | | | | | | | For the time being, all C++ links will provide ObjC core libraries on the command line, via having the link actions imply 'contains_objc_sources', which is a built-in feature that is in the process of being enabled automatically when objective-C/C++ sources are involved in the build. Once that happens, the 'imply' directives will be removed. RELNOTES: Stop using --undefined dynamic_lookup in Apple links. Enables unresolved symbol errors. PiperOrigin-RevId: 169437020
* Automated rollback of commit f26e8694ae78599b3e2004e3360eaf3443fa53a6.Gravatar hlopko2017-09-18
| | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Breaks clang_tidy. *** Original change description *** Introduce -c source_file -o output_file build variables Prior to this cl CompileCommandLine would (almost) unconditionally emit -c and -o flags. This cl removes this logic and relies on crosstool to emit these flags. This is another small step towards platform independent C++ rules. Memory use is not affected, since the build variables used by this cl are already exposed, this cl just forces crosstools to use it. RELNOTES: None. PiperOrigin-RevId: 168834576
* Introduce -c source_file -o output_file build variablesGravatar hlopko2017-09-14
| | | | | | | | | | | | Prior to this cl CompileCommandLine would (almost) unconditionally emit -c and -o flags. This cl removes this logic and relies on crosstool to emit these flags. This is another small step towards platform independent C++ rules. Memory use is not affected, since the build variables used by this cl are already exposed, this cl just forces crosstools to use it. RELNOTES: None. PiperOrigin-RevId: 168671507
* Expose sysroot as a build variableGravatar hlopko2017-09-12
| | | | | | | | | This cl removes hardcoded --sysroot flag generation from bazel when constructing command line for C++ actions. The hardcoded flag is still exposed to Skylark (to stay backwards compatible). RELNOTES: None. PiperOrigin-RevId: 168346711
* Introduce unfiltered_compile_flags build variable, rename copts variable to ↵Gravatar hlopko2017-09-11
| | | | | | | | | | | | | user_compile_flags Also add magic to a feature named 'unfiltered_compile_flags' so the flags expanded from it are not subject to nocopt filtering. This is encore of https://github.com/bazelbuild/bazel/commit/268c0bcbf79f9f3f72d95fa51af0f1b18c5ce29e that was rolled back because it regressed memory. RELNOTES: None. PiperOrigin-RevId: 167989075
* Create an empty filegroup if Bazel doesn't support xcode_config_alias yet.Gravatar lberki2017-09-08
| | | | | | | This is useful so that Skylark code that depends on this rule can decide if it's there or not (as opposed to failing due to a missing dependency) RELNOTES: None. PiperOrigin-RevId: 167839197
* Internal changeGravatar kush2017-09-07
| | | | PiperOrigin-RevId: 167751263