Add runtime option -Xbootclasspathfds: for pre-opened fds
The new option allows the client to pass a pre-opened fds to the
runtime. The number of elements must match the number of BCP jars
specified in -Xbootclasspath. An fd of negative number is a valid
option, in such case the runtime will still open the jar in the
corresponding path in -Xbootclasspath.
Example: -Xbootclasspathfds:10:11:-1:12
The option is currently only used in "unstarted runtime", but will also
be used elsewhere in the follow-up changes.
Bug: 187327262
Test: patch odrefresh to use the option, no longer seeing such openat(2)
Test: m test-art-host-gtest
Change-Id: I1bebbd80136419c03ac1309a8cb8229a0fd69838
diff --git a/runtime/runtime_options.def b/runtime/runtime_options.def
index 7be2fa4..3717fbf 100644
--- a/runtime/runtime_options.def
+++ b/runtime/runtime_options.def
@@ -40,6 +40,7 @@
RUNTIME_OPTIONS_KEY (Unit, ShowVersion)
RUNTIME_OPTIONS_KEY (ParseStringList<':'>,BootClassPath) // std::vector<std::string>
RUNTIME_OPTIONS_KEY (ParseStringList<':'>,BootClassPathLocations) // std::vector<std::string>
+RUNTIME_OPTIONS_KEY (ParseIntList<':'>, BootClassPathFds) // std::vector<int>
RUNTIME_OPTIONS_KEY (std::string, ClassPath)
RUNTIME_OPTIONS_KEY (ParseStringList<':'>,Image)
RUNTIME_OPTIONS_KEY (Unit, CheckJni)