34 Commits

Author SHA1 Message Date
Casey Dahlin
9941dcc7aa First pass on reentrant C++-ish parser
We're flipping Flex/Bison in to reentrant mode, cutting down on global
variables, and exposing a more C++-like interface earlier. This is the first
phase. There's still a couple of weird hacks to deal with the previous code's
reckless disregard for scope sanity, but the outline of things to come is
starting to appear, and this CL really doesn't need to get any bigger.

Change-Id: Ife2d70db026d7ab1319bdf6c586959315666d0bb
Signed-off-by: Casey Dahlin <sadmac@google.com>
2015-09-10 16:55:18 -07:00
Casey Dahlin
ca4543cdba Remove RPC interface Type
AIDL previously supported "rpc" and "flatten" types, which are not used
anywhere in the Android tree. This patch removes them, which significantly cuts
down code and complexity.

Bug: 23517584
Test: Rebuilt AOSP tree against new version
Change-Id: I6cf38d43c1ce109ffca987cc14520945aa22431f
Signed-off-by: Casey Dahlin <sadmac@google.com>
2015-09-02 13:34:26 -07:00
Christopher Wiley
5b88363ed3 Tighten up compiler flags for aidl
Turn all warnings to errors, with special cases for places where
yacc forces us to be lenient.  Remove one variable with 0 references
elsewhere in the code.

These flags are confined to be clang only because the Windows SDK build
is using an older compiler that does not understand these flags.

Change-Id: I6407bd331c25b8845bde46e9a917bce1d6857bd8
2015-08-31 13:55:46 -07:00
Christopher Wiley
a73e004516 Merge "Revert "Tighten up compiler flags for aidl"" 2015-08-31 19:13:04 +00:00
Christopher Wiley
ecaf21c377 Revert "Tighten up compiler flags for aidl"
This reverts commit eea2353a3427f7d157c46e24ab6aba1378e16c2e.

This seems to have broken the build because whatever compiler the builder is using doesn't understand the same "turn off this warning" flags as my local host's compiler.

Change-Id: Ic68b7065b161a5ae683b7082c67147835833e0fa
2015-08-31 19:07:40 +00:00
Christopher Wiley
2f77417cce aidl: Pull main() into dedicated file
This separates the main() entry point from the functionality we're
hoping to test.  While here, redo the header guards to be consistent
accross the codebae.

Bug: 23516947
Change-Id: I61666126bdba0941f14bd0f031caaa30367b864a
Test: Compiles
2015-08-31 10:54:26 -07:00
Christopher Wiley
eea2353a34 Tighten up compiler flags for aidl
Turn all warnings to errors, with special cases for places where
yacc forces us to be lenient.  Remove one variable with 0 references
elsewhere in the code.

Change-Id: Ia7819795eb162e9c77d215088aee4c45bd87c1af
2015-08-30 11:01:31 -07:00
Christopher Wiley
1eaa9ed334 Do not merge namespaces
It is good practice to not include the whole std:: namespace into
the global namespace.  This is doubly true in headers.

TEST=aidl compiles

Change-Id: I910ca8082f61cce4f23f8564b8a12c2828b75b3c
2015-08-24 14:28:36 -07:00
Elliott Hughes
e17788ceff Replace HAVE_MS_C_RUNTIME with _WIN32 in frameworks/base/tools.
Change-Id: Ideef62acbf53a442167c9b8038021affffef9e8a
2015-08-17 12:41:46 -07:00
Elliott Hughes
9ec96f9756 Move frameworks/base/tools/ off AndroidConfig.h.
Change-Id: Ibc7abb67a56945a9618bc91ccdbebe4c806879a5
2015-07-29 14:35:18 -07:00
Elliott Hughes
98c11b511a Use _WIN32 rather than HAVE_WINDOWS_PATHS.
Change-Id: Ib1ae71dfbb20e3e5309ed737f48382cc42d2583f
2015-07-29 08:44:17 -07:00
Ying Wang
50fb02da53 Add phony source target in the generated dependency file of aidl.
This fixes make error when the source .aidl file is moved around but
its path relative to LOCAL_PATH doesn't change.

Bug: 22666539
Change-Id: Idf2492145e4927779d184932a09d61e4fe8ded0f
2015-07-22 17:49:56 -07:00
Yabin Cui
fb8e2b1745 kill OS_CASE_SENSITIVE
Bug: 18314594
Change-Id: Ib11b45d2597b2576bc7df2d0167ce1bbd1449523
2014-11-10 16:08:50 -08:00
Andrew Hsieh
c9d32390e5 include direct.h for _mkdir
Bug: 14416410

The new mingw-w64 toolchain x86_64-w64-mingw32-4.8 no longer
declares _mkdir in io.h.

Change-Id: I624b52d2f35db54a7f28df09f997fc883b0f0557
2014-09-30 02:28:05 -07:00
Elliott Hughes
b30296b5fd Re-apply several tools fixes lost by the directory rearrangement.
Leaks on error in tools/aapt/Images.cpp.
https://code.google.com/p/android/issues/detail?id=61552

Two missing fclose calls in tools/aapt/Resource.cpp.
https://code.google.com/p/android/issues/detail?id=61553

Missing fclose in tools/aidl/aidl.cpp.
https://code.google.com/p/android/issues/detail?id=61554

Change-Id: I56ce144958296961b77354815efc1a245564594b
2014-01-27 10:31:08 -08:00
Adam Lesinski
282e181b58 Revert "Move frameworks/base/tools/ to frameworks/tools/"
This reverts commit 9f6a119c8aa276432ece4fe2118bd8a3c9b1067e.
2014-01-27 10:31:04 -08:00
Mike Lockwood
9f6a119c8a Move frameworks/base/tools/ to frameworks/tools/
Change-Id: I3ffafdab27cc4aca256c3a5806b630795b75d5c8
2013-08-28 09:44:17 -07:00
Ying Wang
0f91c63602 Better aidl generated dependency
Previously if an imported aidl file has been deleted or moved,
the generated dependency file still contains the stale file name,
and make will fail with "No rule to make target <the deleted/moved
file>".
This change uses technique described in section "Automatic Dependency
Generation", Chapter 8 of "Managing Projects with GNU Make (3d
Edition)".
The same technique is used by the Android platform build system to
generate C/C++ header dependencies.

Bug: 10459179
Change-Id: Ib0c01a4234ef1af994487fdc846cdf8d13a675f6
2013-08-23 17:19:17 -07:00
Maurice Chu
02822d0590 Enhance AIDL to take an explicit id for methods
This adds an annotation to methods in AIDL of the form
"void myMethod() = 3;" to explicitly set the onTransact
id for the method.  Either all methods must have explicitly
annotated id's or none of them should be explicitly annotated.
There is error checking in the AIDL compiler
for duplicate id's and id's outside of the valid range.

Bug: 7353910
Change-Id: I868045e3f112c9a279c573cea368a621116cbf77
2012-10-18 14:47:13 -07:00
Adam Powell
50a94b8630 Allow multiple 'parcelable' declarations in aidl files
This solves a problem with declaring multiple Parcelable static inner
classes.

Change-Id: I5e42b412d6d937df19a388988be5aa58a8dbc3e4
2012-08-16 14:54:26 -07:00
Joe Onorato
fcb310f936 For events, require that the parameters be marked in.
(because they won't work otherwise)
2012-02-10 14:44:04 -08:00
Joe Onorato
a1c6d909c2 aidl: All flattenable types now must also be parcelable.
This is more a limitation of the grammar than anything else triggering laziness on my part.
2012-02-10 10:51:23 -08:00
Joe Onorato
e24dbeafe6 add presenters to aidl. 2012-02-10 10:51:22 -08:00
Joe Onorato
7db766c3fe Support custom flattenable types for RPC. 2012-02-10 10:51:21 -08:00
Joe Onorato
fdfe2ff8c6 Checkpoint adding @home RPC support to aidl 2012-02-10 10:51:20 -08:00
Xavier Ducrohet
18fff11e15 Add new dependency generation option to aidl.
The SDK build system does not provide an output file
and instead uses the -o<FOLDER> option and lets aidl figure
out the intermediary folders that represents the packages,
and the filename based on the input file (and its package).

Because of this the -d<FILE> option to generate a dependency
file is not convenient.

Instead the new option, -a (no parameters), automatically generate
a dependency files next to the output file.

Also, when compiling parcelable aidl files, without the -b option,
a dependency file is still generated. This is used by the SDK build
system since it cannot parse the file separately and instead tries
to compile every .aidl file.
The generation of this dependency file (which shows no output) allows
to know when any type of aidl file has been compiled.

Change-Id: If81dc7e1e0a780592c94d1850a1d1b094d6e7908
2011-09-01 14:14:14 -07:00
Elliott Hughes
b9eba866b2 Fix aidl to cope with multiple collection types per method.
Bug: http://code.google.com/p/android/issues/detail?id=18497
Change-Id: I152416022524d2860cb16b46c4812c5be6bdcbad
2011-07-13 12:10:30 -07:00
Scott Turner
066aa99d2d long modifier was on the wrong argument. 2010-01-14 21:05:17 -05:00
The Android Open Source Project
ba87e3e6c9 auto import from //branches/cupcake_rel/...@138607 2009-03-13 13:04:22 -07:00
The Android Open Source Project
4df2423a94 auto import from //depot/cupcake/@136594 2009-03-05 14:34:35 -08:00
The Android Open Source Project
9066cfe988 auto import from //depot/cupcake/@135843 2009-03-03 19:31:44 -08:00
The Android Open Source Project
d83a98f4ce auto import from //depot/cupcake/@135843 2009-03-03 18:28:45 -08:00
The Android Open Source Project
b798689749 auto import from //branches/cupcake/...@125939 2009-01-09 17:51:23 -08:00
The Android Open Source Project
54b6cfa9a9 Initial Contribution 2008-10-21 07:00:00 -07:00