Replace vector<string> with array<string_view> to improve compile speed
This had been taking:
Android Arm: 1.0s
Android Arm64: 0.7s
Linux X86_64: 33.0s
Windows X86: 76.8s
And is now taking:
Android Arm: 3.3s
Android Arm64: 2.8s
Linux X86_64: 2.8s
Windows X86: 2.8s
All of these variants were being built at least once during a normal `m`
build (the Android variants more than once due to the vendor variants).
The object files are now pure data, instead of a lot of code to
initialize the vector and string objects with the string constants.
The difference in speeds between Device/Host before this change was due
to a difference in inlining the string constructor. Bionic
w/_FORTIFY_SOURCE was triggering it not to be inlined, which was a lot
less code, and faster to compile. (bug 148189733)
Test: treehugger
Change-Id: Ifbf2705d8ae753840352d0548485e5a3a73b45e4
3 files changed