aboutsummaryrefslogtreecommitdiffstats
path: root/cc/gen.go
Commit message (Collapse)AuthorAgeFilesLines
* Add proto.canonical_path_from_rootDan Willemsen2018-02-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Historically, we've always passed '-I .' as the first argument to protoc, essentially treating all proto file package names as their full path in the android source tree. This would make sense in a monorepo world, but it makes less sense when we're pulling in external projects with established package names. So keep the same default (for now), but allow individual builds to opt into using local paths as the default names with 'canonical_path_from_root: false'. A cleanup effort and/or large scale change in the future could change the default to false. As part of this, run protoc once per input proto file, since the flags may need to change per-file. We'll also need this in order to specify --dependency_out in the future. Bug: 70704330 Test: aosp/master build-aosp_arm.ninja is identical Test: aosp/master soong/build.ninja has expected changes Test: m Test: Build protobuf test Change-Id: I9d6de9fd630326bbcced1c62a4a7e9546429b0ce
* Switch to build-tools bisonDan Willemsen2018-01-081-2/+2
| | | | | | Test: m Test: mma system/tools/hidl Change-Id: I467c63792082ef335f2d7788d538db76e9e91d87
* When compiling with the lite protobuf option, pass the option to aprotoc to ↵Joe Onorato2017-12-151-1/+2
| | | | | | | | force the lite runtime. Test: make Merged-In: I450f89d144d496a6ddfccc6a6a5a679a05809595 Change-Id: I450f89d144d496a6ddfccc6a6a5a679a05809595
* Move ModuleContext.ModuleBuild to ModuleContext.BuildColin Cross2017-10-241-4/+4
| | | | | | | | | | | | Now that android.ModuleContext does not include blueprint.ModuleContext we can rename android.ModuleContext.ModuleBuild to android.ModuleContext.Build without colliding with blueprint.ModuleContext.Build. Leave ModuleBuild as a wrapper around Build for now to avoid having to update all the users outside build/soong simultaneously. Test: m checkbuild Change-Id: I18eb8cc04faf002049a11d9aac97e9732ff5d638
* Add support for .proto files in java modulesColin Cross2017-10-031-4/+3
| | | | | Test: m -j checkbuild Change-Id: Ia03429948baebff85164a91a34507866c97a08ef
* Refactor proto in preparation for java proto supportColin Cross2017-09-111-3/+4
| | | | | Test: m -j checkbuild Change-Id: Idf00ea0bacb2777458f9af2c7eb47e1e1854eeba
* Add support for Windows Message CompilerDan Willemsen2017-09-091-0/+31
| | | | | | | | | We've only got one user of this currently, but since it needs the location of the toolchain, and different flags based on 32 vs 64-bit, it's easier just to add support than to get this into a genrule. Test: Convert external/mdnsresponder to Soong, build Change-Id: I6c19a82bc14f6ab556f6cc5f37164862ba5f9083
* Prettify soong ninja build descriptionsColin Cross2017-05-101-9/+9
| | | | | | | | | | | | | | | | | Descriptions currently look like: [ 0% 4/29328] cc out-soong/.intermediates/external/clang/lib/Sema/libclangSema/android_arm_armv7-a-neon_denver_static_core/obj/external/clang/lib/Sema/SemaCodeComplete.o This is not very helpful - most of the characters are used to show the output path, which contains useful information like target architecture, but also contains most of the path to the source files twice, and less useful information like the exact variant name used by soong. Make the descriptions look like: [ 0% 3/29329] //external/clang/lib/Sema:libclangSema clang++ SemaTemplateInstantiate.cpp This is //path/to/module:modulename tool relative/path/to/source/file Test: builds, looks pretty Change-Id: I3087aa7d4eb1860ef6239d77407b8b35445616d7
* Support .rs and .fs files in cc_* module srcs listsColin Cross2017-05-051-0/+10
| | | | | | | Translate .rs and .fs files to .cpp files using llvm-rs-cc. Test: builds Change-Id: I242cea0d09c9985730a512cec7705c3f1479f4ed
* Support aidl cpp generationDan Willemsen2016-12-051-0/+32
| | | | | | | | | Ideally we'd calculate the headers that are written here too, but I'll add that in a later change that actually enforces the generated header list. Test: mmma -j system/tools/aidl Change-Id: Ifd2e8e8ff444b0f67270fb5156e7bf7bceddb6be
* Add support for Implicit OutputsDan Willemsen2016-11-031-6/+6
| | | | | | Test: mmma -j system/tools/hidl Test: Inspect out/soong/build.ninja before/after Change-Id: I8e91a033342a12302d51358c5be244e32ad689d7
* Add subdir to GenPathDan Willemsen2016-11-021-5/+5
| | | | | | | | | We were emulating this for proto files, standardize it and make the other generators use it as well. Test: Compare out/soong/build.ninja before/after change Test: mmma -j system/tools/hidl Change-Id: I1888c7b981749060a398387bbb9b481270bf6d75
* Add support for .proto filesColin Cross2016-10-271-0/+4
| | | | | | | | | .proto files are translated to .pb.cc and .pb.h files, which are then compiled normally. Bug: 32286026 Test: mmma -j system/extras/perfprofd Change-Id: I538071424d667aacf35b4b8bfebe217f5f092726
* Fix lex/yacc pathDan Willemsen2016-09-131-2/+2
| | | | | Test: It no longer panics when there is a .yy/.ll file to build Change-Id: I15c17d0df9449eabbede5d8afef955156baaba3d
* Enable goma in soongColin Cross2016-08-311-2/+2
| | | | | | | | | | When the UseGoma flag is set, put all rules except the C compilation rule in an externally defined local_pool, which will have been created by kati. The gomacc wrapper will already be in the CC_WRAPPER environment variable. Bug: 31142427 Change-Id: I699d4edff2e302eee398dad8692ceb14721a628c
* Rename common to androidColin Cross2016-05-181-14/+14
| | | | | | | | | | | | | | | | Rename the "common" package to "android", because common is too generic. Also removes all android.Android naming stutter. Ran: gomvpkg -from 'android/soong/common' -to 'android/soong/android' gorename -from '"android/soong/android".AndroidModuleContext' -to 'ModuleContext' gorename -from '"android/soong/android".AndroidBaseContext' -to 'BaseContext' gorename -from '"android/soong/android".AndroidModuleBase' -to 'ModuleBase' gorename -from '"android/soong/android".AndroidBottomUpMutatorContext' -to 'BottomUpMutatorContext' gorename -from '"android/soong/android".AndroidTopDownMutatorContext' -to 'TopDownMutatorContext' gorename -from '"android/soong/android".AndroidModule' -to 'Module' Change-Id: I3b23590b8ce7c8a1ea1139411d84a53163288da7
* Generate .c for .y and .lDan Willemsen2016-03-011-21/+22
| | | | | | Soong port of https://android-review.googlesource.com/195737 Change-Id: I9ab6dc149c258f7642bc36c3fa32f90ff7ee51a4
* Use `Path` instead of string for file pathsDan Willemsen2015-12-091-30/+23
| | | | | | | | | | | | This centralizes verification and common operations, like converting the path to a source file to the path for a built object. It also embeds the configuration knowledge into the path, so that we can remove "${SrcDir}/path" from the ninja file. When SrcDir is '.', that leads to paths like './path' instead of just 'path' like make is doing, causing differences in compiled binaries. Change-Id: Ib4e8910a6e867ce1b7b420d927c04f1142a7589e
* Use Rule-local implicit dependenciesDan Willemsen2015-11-171-8/+8
| | | | | | | | | | | Depends on https://github.com/google/blueprint/pull/78 This uses the new CommandDeps field to move implicit dependencies embedded in the Command string next to the definition, instead of having to specify them in every BuildParam struct. This should make it easier to verify dependencies. Change-Id: I2711b160920e22fa962a436e1f7041272166f50f
* Fix java resource glob file list locationColin Cross2015-08-241-3/+2
| | | | | | | | | | | | | The source path was being appended to the module out directory to create the file list file, which was resulting in .. in the source path moving the file list file up the directory tree. Use SrcDirRelPath to convert the globbed resource directories to be relatiave to $srcDir before appending them. Also do the same fix to generated aidl, logtags, yacc, and lex files. Change-Id: I2e636bd30abf03bc1d80a897951a9812cc3e09ef
* Add yacc and lex supportColin Cross2015-04-081-0/+109
Add support for yacc (.y or .yy) and lex (.l or .ll) files. Also tweak locations of .o files for normal and generated sources to makes sure they don't collide. Change-Id: I03172cddbdc022525bf392a81d72050406b8cdb3