This has been moved into its own repository at
//system/tools/aidl
Test: Built aosp_arm-eng from scratch.
Bug: 23691099
Change-Id: Ic45d55682b9dcafe894efe0a6317792f9c1236c6
This is attempting to fix build breakage caused by redefining the isatty stub
for win32.
Change-Id: I5f854934cb9d2b2981f6349045e85d9ad737aa77
Signed-off-by: Casey Dahlin <sadmac@google.com>
We have to step up to a GLR parser to do this without exceptions (for no
reason other than Bison happens to use exceptions for the LALR(1) template and
not for the GLR one), but this should let us smooth out integration going
forward.
Change-Id: Iff44662914b4a65dfa5612d07c3a1ede07e6e4a9
Signed-off-by: Casey Dahlin <sadmac@google.com>
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>
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>
This test sets up an artificial hierarchy of .aidl files, then
checks that the generated code contains a substring that we
know to be correct. This isn't a very good unittest, but it does
validate that the whole flow works start to finish.
Bug: 23516947
Test: compiles, unit tests pass.
Change-Id: I931b7659731b05440040623e12596669604cef3a
Compile aidl's logic into a static library that can be
linked against both the unittest binary and the executable. Validate
that this is working by writing a basic unittest against options
parsing.
Provide default values for Options struct members. These were
previously taking on values according to the the bits in the memory
allocated to hold them for preprocessed inputs.
Bug: 23516947
Change-Id: Ib57cd7f473995f7851d788deac39f9c4d9018e8f
Test: compiles and unittests pass
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
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
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
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
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
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
Bug: 14416410
The new mingw-w64 toolchain x86_64-w64-mingw32-4.8 no longer
declares _mkdir in io.h.
Change-Id: I624b52d2f35db54a7f28df09f997fc883b0f0557
This patch fixes tools/aidl/Type.cpp to compile with
a more recent SDK host toolchain sysroot (that has not
been submitted yet).
The main issue is that the code uses ssize_t which is
defined in <sys/types.h>, but didn't include the header
directly.
Apparently, this no longer compiles when using the Ubuntu
10.04 libc6-dev headers (the current SDK toolchain is
based on Ubuntu 8.04), so perform an explicit include
to fix this.
NOTE: This doesn't break the Windows SDK build.
Change-Id: Idcacf8f8d1c606b39bf8aa75ab409aa0c2a3cd5a
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
Fix issue when aidl generation doesn't use the right type when
it is a suffix of a pre-declared type.
eg. android.location.Location and foo.android.location.Location. The
aidl generation will never use foo.android.location.Location.
The tentative fix reverses the order in which Namespace.Search iterates
through the known types.
A better fix would be to annotate the types that are declared in the
aidl import statements to be prioritary in Namespace.Search. Lmk if I
you agree with this approach and think that this is worth the work.
Thanks!
Change-Id: I97dd1a1d417075accf1d61f9aba5aba3dea175c6