DescriptionCompile Android using GRIT's new --no-output-all-resource-defines flag.
This flag causes GRIT to include the same resources in generated .h
files as are included in the PAK files. This seems like an obvious thing
to do, right? Well, before this CL, *every* resource from the GRD file
was listed in the .h file, even resources inside of <if> statements that
evaluated to false. As a result, it was possible to reference a resource
(e.g. IDS_FOO) in a .cc file, even if IDS_FOO was excluded from the PAK
file. What happened at runtime? Crash!
This change brings compile-time safety to resource loading: the crash
mentioned above would now be a compile failure since IDS_FOO is no
longer in the generated .h file.
BUG=428947
Committed: https://crrev.com/0548dfae799a5423abd007f2f9d8ea0a1d5d571b
Cr-Commit-Position: refs/heads/master@{#303180}
Patch Set 1 #Patch Set 2 : real fixes #Patch Set 3 : use --no-output-all-resource-defines #
Total comments: 3
Patch Set 4 : ifdefs in printing code #
Total comments: 2
Patch Set 5 : merged two ifdefs #
Messages
Total messages: 21 (4 generated)
|