aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/objc/CompilationSupport.java
Commit message (Collapse)AuthorAge
* Move RuleConfiguredTarget to lib.analysis.configuredtargets.Gravatar gregce2017-09-19
| | | | | | This is a trivial change with a large file footprint. PiperOrigin-RevId: 169169864
* Automatic code cleanup.Gravatar cushon2017-09-15
| | | | PiperOrigin-RevId: 168802886
* Support multiple command lines / params files in SpawnAction.Gravatar tomlu2017-09-15
| | | | | | This is necessary for the upcoming Skylark implementation of param files. PiperOrigin-RevId: 168744486
* Inline CustomCommandLine methods that can be expressed using VectorArg.Gravatar tomlu2017-09-12
| | | | | | This whole CL was done using IDE refactoring tools and should be safe. PiperOrigin-RevId: 168275575
* Automated rollback of commit fc41c430e4de4594a1d699f573d191cbad52a2fb.Gravatar plf2017-09-01
| | | | PiperOrigin-RevId: 167154793
* Move ObjcProvider FLAG into a new provider type (TransitiveSourcesProvider) ↵Gravatar cpeyser2017-08-30
| | | | | | that is accessible to the c++ rules. PiperOrigin-RevId: 166934390
* Automated rollback of commit 1af9b1e2238c3b43a2b66233495ecf7b6ef4dcab.Gravatar Googler2017-08-25
| | | | | | | | | | | | *** Reason for rollback *** Reason for previous rollback was identified as being a memory regression causing some cases to hit java heap limit. Proposal is to increase java heap limit to compensate and just go with the original change. *** Original change description *** Automated rollback of commit 6cfffdf37e11018c7e6e2cabc90440d6d29c819b. PiperOrigin-RevId: 166426608
* Improve CustomCommandLine interface.Gravatar tomlu2017-08-22
| | | | | | | | | | | | | | | | In converting SpawnAction.Builder (multi-thousand line CL) users directly to CustomCommandLine I didn't like the resulting loss of readability, and the methods didn't feel very discoverable. Unless it's very convenient and readable to use CustomCommandLine, people will resort to non-memory efficient patterns by default. I'm holding that CL for this, which should offer a nicer interface. This CL removes VectorArg from the API contact surface area, instead creating 64 overloads for every valid combination of parameters. Pretty sad, but the methods dispatch straight to internal helper methods so it's mostly boilerplate to the tune of +400 LOC. Other changes: * Change ImmutableCollection -> Collection and copy the args directly into the internal args vector. Saves on collection object overhead and saves users from having to create immutable copies. * Change some names, notably add -> addAll for collection methods * Create additional missing overloads * Fix JavaDoc RELNOTES: None PiperOrigin-RevId: 165943879
* Add more type safety to CustomCommandLine.Gravatar tomlu2017-08-16
| | | | | | | | | | | | Allowing add(Object) is too loose and can easily lead to programmer mistakes. Because of type erasure, we can't use the same overload name for (eg.) add(NestedSet<String>) and add(NestedSet<Artifact>). The API is overhauled to use the same terms everywhere, eg. "add", "addPaths", "addExecPaths". This is similar to how it used to be a few CLs ago. The API is overhauled to make sure it's consistent for all types. While tedious, the facade methods immediately dispatch to internal helpers, so implementation wise it's not too heavy. While large, this CL is almost entirely an automated refactor. PiperOrigin-RevId: 165358287
* Add @CompileTimeConstant annotations to CustomCommandLine.Gravatar tomlu2017-08-16
| | | | | | | | | This enforces certain memory-efficient patterns. For deliberate use of dynamic strings, explicitly named overloads are introduced, with javadoc that guides the programmer into making the right choice. This CL is a memory no-op on benchmarks, but it tries to prevent backslide by making sure programmers make conscious choices when they construct their command lines. RELNOTES: None PiperOrigin-RevId: 165185997
* Inline @Deprecated methods in CustomCommandLine.Gravatar tomlu2017-08-11
| | | | | | | | | Apart from updating CustomCommandLineTest this CL is entirely automated. We also sneak in a rename of addFormat -> addFormatted. RELNOTES: None PiperOrigin-RevId: 164870140
* Move core test classes to lib.analysis.testGravatar ulfjack2017-08-11
| | | | | | | | These are depended upon by analysis code, so need to live in the same library as lib.analysis. Moving them here makes it possible to split the build-base library into separate libraries for analysis, execution, and rules. PiperOrigin-RevId: 164847161
* Improve CustomCommandLine.Gravatar tomlu2017-08-10
| | | | | | | | | | | | | Instead of having custom ArgvFragments for every combination of desired things, we make a combined "interpreter" of argvs. This saves memory and simplifies things as we do not have to allocate a strategy instance per call to args (instead pushing a single shared instance, followed by the args). The generic interpreter does have a lot of branching compared to the bespoke implementations, but because the branch is always the same for long stretches the branch predictor should easily be able to handle it with minimal overhead (~1 cycle per branch IIRC). This CL also elevates that we either want a NestedSet or an ImmutableCollection to the surface of the API, so consumers understand the cost when they call it with a non-immutable collection. Most of the changes in clients is due to this. To cut down on CL churn, @Deprecated forwarding methods are added to CustomCommandLine. These will be removed in a separate CL using IDE inlining. RELNOTES: None PiperOrigin-RevId: 164725370
* Automated rollback of commit 6cfffdf37e11018c7e6e2cabc90440d6d29c819b.Gravatar cpeyser2017-08-02
| | | | PiperOrigin-RevId: 163889699
* Make all WithLegacySkylarkName providers declared providers.Gravatar dslomov2017-07-28
| | | | | RELNOTES: None. PiperOrigin-RevId: 163343931
* macOS link actions set the correct system framework include pathsGravatar cparsons2017-07-26
| | | | | RELNOTES: None. PiperOrigin-RevId: 163114020
* Automated rollback of commit 6d884afa8da1b08288cb0108e8bbf6c22ec63393.Gravatar dslomov2017-07-25
| | | | | | | | | | | | | *** Reason for rollback *** Broke bazel_apple_rules *** Original change description *** Make all WithLegacySkylarkName providers declared providers. RELNOTES: None PiperOrigin-RevId: 163054821
* Make all WithLegacySkylarkName providers declared providers.Gravatar dslomov2017-07-25
| | | | | RELNOTES: None PiperOrigin-RevId: 163042362
* Route Xcode version information through an implicit dependency instead of ↵Gravatar lberki2017-07-25
| | | | | | | | | | | | | | the configuration. This is part of the crusade to kill package loading in configuration creation. AppleConfiguration still retains the version information for the following reasons: - Some Skylark rules access it that way. The plan is to create an xcode_config_alias() rule that can be an implicit dependency of Skylark rules and to export the version information to Skylark from XcodeVersionsProvider. - The minimum OS version is part of the name of the output directory. The plan for that is simply to remove it. Hopefully we can get away with it. - They allow us to add assertions to make sure the new mechanism works like the old one. RELNOTES: None. PiperOrigin-RevId: 163038724
* Automated rollback of commit a76c94be7c56b93fc5a2f9ececfba7ac1f61f69c.Gravatar laszlocsomor2017-07-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Caused memory regression. *** Original change description *** CustomCommandLine.Builder: clean up its interface In this commit: - remove unused methods and classes - turn CustomCommandLine.ArgvFragment into an interface - remove the CustomCommandLine.TreeFileArtifactArgvFragment abstract class; it only had one remaining subclass - add @Nullable annotations where nulls are fine - add Precondition checks for non-nullable args - simplify the interface by removing add* methods that can be composed of other add* methods; this makes it easier to see... *** RELNOTES: none PiperOrigin-RevId: 162320031
* CustomCommandLine.Builder: clean up its interfaceGravatar laszlocsomor2017-07-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In this commit: - remove unused methods and classes - turn CustomCommandLine.ArgvFragment into an interface - remove the CustomCommandLine.TreeFileArtifactArgvFragment abstract class; it only had one remaining subclass - add @Nullable annotations where nulls are fine - add Precondition checks for non-nullable args - simplify the interface by removing add* methods that can be composed of other add* methods; this makes it easier to see what the callers do with the Builder - remove add* methods that add a single argument followed by a list of other elements (or a joined string of them); these had a bug in that they didn't check if the collection was empty (only that it was not null), and if it was empty then the single argument was still added though it was not followed by any value - fix call sites of add* methods where we previously could have added a flag with an empty collection - audit every affected call site RELNOTES: none PiperOrigin-RevId: 161957521
* Add module_map attribute to objc_libraryGravatar Googler2017-07-14
| | | | | | This allows users to specify a custom module map. PiperOrigin-RevId: 161827651
* Platform -> ApplePlatform, to avoid ambiguity with the newly introducedGravatar cpeyser2017-07-07
| | | | | | Platform rule. PiperOrigin-RevId: 161203491
* Automated rollback of commit 9000e61fc1737444392ffe251727e8331fab3cf2.Gravatar Googler2017-07-07
| | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Fixed handling of pch, so this should work again *** Original change description *** Automated rollback of commit 29ec1b89989db411d2038e2df8657b6435f80403. *** Reason for rollback *** Breaks the classroom_ios TAP project [1] in the presence of --experimental_objc_crosstool=all, which was added to the global .blazerc last week. [1] [] *** Original change description *** Change ProtobufSupport to use CrosstoolCompilationSupport if experimental_objc_crosstool=all PiperOrigin-RevId: 161159846
* Switch from using set/getPchFile on CompilationArtifacts to a doNotUsePch ↵Gravatar Googler2017-07-07
| | | | | | option on CompilationSupport. In the process correctly respect whether to use the pch file under crosstool compilation mode. PiperOrigin-RevId: 161156717
* Automated conversion to Java 8Gravatar laurentlb2017-06-30
| | | | | | | With a few manual fixes for readability. RELNOTES: None. PiperOrigin-RevId: 160582556
* Automated g4 rollback of commit 29ec1b89989db411d2038e2df8657b6435f80403.Gravatar fwe2017-06-13
| | | | | | | | | | | | | | *** Reason for rollback *** Breaks the classroom_ios TAP project [1] in the presence of --experimental_objc_crosstool=all, which was added to the global .blazerc last week. [1] [] *** Original change description *** Change ProtobufSupport to use CrosstoolCompilationSupport if experimental_objc_crosstool=all PiperOrigin-RevId: 158727100
* Specify isTestRule as an input to CompilationSupport instead of from the ↵Gravatar cparsons2017-06-06
| | | | | | | current rule name RELNOTES: None. PiperOrigin-RevId: 158068921
* Remove Xcodege integration from Blaze.Gravatar schmitt2017-06-05
| | | | | RELNOTES: None. PiperOrigin-RevId: 157857216
* Change ProtobufSupport to use CrosstoolCompilationSupport if ↵Gravatar Googler2017-05-30
| | | | | | experimental_objc_crosstool=all PiperOrigin-RevId: 157421008
* Extract :cc_toolchain as constantGravatar hlopko2017-05-22
| | | | | | | | And while at it cleanup all the calls of CppHelper.getToolchain and CppHelper.getFdoSupport. RELNOTES: None. PiperOrigin-RevId: 156716291
* Retire the experimental_objc_library rule and --experimental_objc_library flag.Gravatar cpeyser2017-05-04
| | | | | | | | Re-organize ObjcLibraryTest and ExperimentalObjcLibraryTest -> LegacyObjcLibraryTest and CrosstoolObjcLibraryTest, according to the pattern used in the other unit tests. PiperOrigin-RevId: 155120143
* Roll forward of ↵Gravatar Googler2017-05-02
| | | | | | | | | | | | | | | | | | | | | | | | https://github.com/bazelbuild/bazel/commit/5f31944b8942818aaf53571c76f5c6a9a9dafc72: Custom module map for j2objc_library Automated g4 rollback of commit e7fe50aa727df9ef0a3d37fa258d017971035515. *** Reason for rollback *** Roll forward. The bzl change is removed because it has to be submitted after next Blaze release. *** Original change description *** Automated g4 rollback of commit 5f31944b8942818aaf53571c76f5c6a9a9dafc72. *** Reason for rollback *** This caused some build breaks. *** Original change description *** Custom module map for j2objc_library PiperOrigin-RevId: 154726197
* Automated g4 rollback of commit a83a5df53ca184ad59a4a46cd9dfa747bf08007a.Gravatar Googler2017-04-30
| | | | | | | | | | | | *** Reason for rollback *** This caused some build breaks. *** Original change description *** Custom module map for j2objc_library PiperOrigin-RevId: 154608761
* Custom module map for j2objc_libraryGravatar Googler2017-04-30
| | | | PiperOrigin-RevId: 154606005
* Export the FILES_TO_COMPILE output group from the objc rules. Add a builder ↵Gravatar cpeyser2017-04-25
| | | | | | to CompilationSupport to clean up that expanding API. PiperOrigin-RevId: 154077775
* Partition ObjC header scanning actions to better handle large targets.Gravatar Googler2017-04-14
| | | | PiperOrigin-RevId: 153140874
* objc_proto_library does not pick up generated cc code in compile actions.Gravatar cpeyser2017-04-05
| | | | PiperOrigin-RevId: 152169986
* Refactor all ctor callsites of PathFragment to instead call a static ↵Gravatar nharmata2017-04-05
| | | | | | | | | | | | 'create' method. This paves the way for changing PathFragment to e.g. an abstract class with multiple subclasses. This way we can split out the windows-specific stuff into one of these concrete classes, making the code more readable and also saving memory (since the shallow heap size of the NonWindowsPathFragment subclass will hopefully be smaller than that of the current PathFragment). This also lets us pursue gc churn optimizations. We can now do interning in PathFragment#create and can also get rid of unnecessary intermediate PathFragment allocations. RELNOTES: None PiperOrigin-RevId: 152145768
* Implement DSYM generation for the CROSSTOOL rules.Gravatar cpeyser2017-04-04
| | | | PiperOrigin-RevId: 152011915
* Apple binary configures actions not just with it's child's config and provider,Gravatar Cal Peyser2017-03-28
| | | | | | | | but also its toolchain. -- PiperOrigin-RevId: 151444602 MOS_MIGRATED_REVID=151444602
* Header thinning feature now ships the appropriate Apple SDK with header ↵Gravatar Googler2017-03-16
| | | | | | | | scanner tool to ensure that the correct headers are detected without building any assumptions into the tool. -- PiperOrigin-RevId: 150238621 MOS_MIGRATED_REVID=150238621
* Adds support for the header thinning feature to the new Objective-C rule ↵Gravatar Googler2017-03-03
| | | | | | | | implementation that uses crosstool for compilation. -- PiperOrigin-RevId: 149083774 MOS_MIGRATED_REVID=149083774
* CrosstoolCompilationSupport registers a binary strip action when binaryGravatar Cal Peyser2017-02-27
| | | | | | | | stripping is enabled. -- PiperOrigin-RevId: 148458258 MOS_MIGRATED_REVID=148458258
* Update to header thinning feature to create header_scanner actions based on ↵Gravatar Googler2017-02-23
| | | | | | | | compiler flags. -- PiperOrigin-RevId: 148273368 MOS_MIGRATED_REVID=148273368
* Crosstool compilation support for J2ObjcAspect.Gravatar Rumou Duan2017-02-22
| | | | | | | | Note that I also have to make some changes to cpp files to add the ability to specify a suffix for linked artifacts. This helps to avoid an artifact conflict between proto_library and J2ObjcAspect acting on proto_library, where both will create an archive file. J2ObjcAspect will simply generate a "_j2objc.a" archive instead of ".a" archive. -- PiperOrigin-RevId: 148135630 MOS_MIGRATED_REVID=148135630
* Generated files directory is passed to dependers as a user header search ↵Gravatar Cal Peyser2017-02-09
| | | | | | | | path. In the process, rename and replace the incorrectly named ObjcCommon.Builder#addUserHeaderSearchPaths -- PiperOrigin-RevId: 147038434 MOS_MIGRATED_REVID=147038434
* experimental_objc_library excludes non-.h headers, as does objc_library.Gravatar Cal Peyser2017-02-09
| | | | | | -- PiperOrigin-RevId: 146958087 MOS_MIGRATED_REVID=146958087
* Experimental feature to do header thinning of Objective-C compilation actions.Gravatar Googler2017-02-03
| | | | | | -- PiperOrigin-RevId: 146385106 MOS_MIGRATED_REVID=146385106
* Root j2objc linker artifacts underneath the appropriate child configurationGravatar Chris Parsons2017-01-26
| | | | | | -- PiperOrigin-RevId: 145701736 MOS_MIGRATED_REVID=145701736