1/*
2 * Copyright (C) 2017 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License")
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef DEX2OAT_OPTIONS_KEY
18#error "Please #define DEX2OAT_OPTIONS_KEY before #including this file"
19#define DEX2OAT_OPTIONS_KEY(...)  // Don't display errors in this file in IDEs.
20#endif
21
22// This file defines the list of keys for Dex2oatOptions.
23// These can be used with Dex2oatOptions.Get/Set/etc, for example:
24//         Dex2oatOptions opt; bool* dex2oat_enabled = opt.Get(Dex2oatOptions::Dex2Oat);
25//
26// Column Descriptions:
27//                   <<Type>>             <<Key Name>>                  <<Default Value>>
28//
29// Default values are only used by Map::GetOrDefault(K<T>).
30// If a default value is omitted here, T{} is used as the default value, which is
31// almost-always the value of the type as if it was memset to all 0.
32//
33// Please keep the columns aligned if possible when adding new rows.
34//
35
36// Parse-able keys from the command line.
37DEX2OAT_OPTIONS_KEY (CompactDexLevel,                CompactDexLevel)
38DEX2OAT_OPTIONS_KEY (std::vector<std::string>,       DexFiles)
39DEX2OAT_OPTIONS_KEY (std::vector<std::string>,       DexLocations)
40DEX2OAT_OPTIONS_KEY (int,                            ZipFd)
41DEX2OAT_OPTIONS_KEY (std::string,                    ZipLocation)
42DEX2OAT_OPTIONS_KEY (int,                            InputVdexFd)
43DEX2OAT_OPTIONS_KEY (std::string,                    InputVdex)
44DEX2OAT_OPTIONS_KEY (int,                            OutputVdexFd)
45DEX2OAT_OPTIONS_KEY (std::string,                    OutputVdex)
46DEX2OAT_OPTIONS_KEY (int,                            DmFd)
47DEX2OAT_OPTIONS_KEY (std::string,                    DmFile)
48DEX2OAT_OPTIONS_KEY (std::string,                    OatFile)
49DEX2OAT_OPTIONS_KEY (std::string,                    OatSymbols)
50DEX2OAT_OPTIONS_KEY (Unit,                           Strip)
51DEX2OAT_OPTIONS_KEY (int,                            OatFd)
52DEX2OAT_OPTIONS_KEY (std::string,                    OatLocation)
53DEX2OAT_OPTIONS_KEY (bool,                           Watchdog)
54DEX2OAT_OPTIONS_KEY (int,                            WatchdogTimeout)
55DEX2OAT_OPTIONS_KEY (unsigned int,                   Threads)
56DEX2OAT_OPTIONS_KEY (std::vector<std::int32_t>,      CpuSet)
57DEX2OAT_OPTIONS_KEY (std::string,                    ImageFilename)
58DEX2OAT_OPTIONS_KEY (int,                            ImageFd)
59DEX2OAT_OPTIONS_KEY (ImageHeader::StorageMode,       ImageFormat)
60DEX2OAT_OPTIONS_KEY (std::string,                    Passes)
61DEX2OAT_OPTIONS_KEY (std::string,                    Base)  // TODO: Hex string parsing.
62DEX2OAT_OPTIONS_KEY (std::string,                    BootImage)
63DEX2OAT_OPTIONS_KEY (std::string,                    AndroidRoot)
64DEX2OAT_OPTIONS_KEY (InstructionSet,                 TargetInstructionSet)
65DEX2OAT_OPTIONS_KEY (std::string,                    TargetInstructionSetVariant)
66DEX2OAT_OPTIONS_KEY (std::string,                    TargetInstructionSetFeatures)
67DEX2OAT_OPTIONS_KEY (Compiler::Kind,                 Backend)
68DEX2OAT_OPTIONS_KEY (std::string,                    Profile)
69DEX2OAT_OPTIONS_KEY (int,                            ProfileFd)
70DEX2OAT_OPTIONS_KEY (Unit,                           Host)
71DEX2OAT_OPTIONS_KEY (Unit,                           DumpTiming)
72DEX2OAT_OPTIONS_KEY (Unit,                           DumpPasses)
73DEX2OAT_OPTIONS_KEY (Unit,                           DumpStats)
74DEX2OAT_OPTIONS_KEY (linker::CopyOption,             CopyDexFiles)
75DEX2OAT_OPTIONS_KEY (Unit,                           AvoidStoringInvocation)
76DEX2OAT_OPTIONS_KEY (std::string,                    SwapFile)
77DEX2OAT_OPTIONS_KEY (int,                            SwapFileFd)
78DEX2OAT_OPTIONS_KEY (unsigned int,                   SwapDexSizeThreshold)
79DEX2OAT_OPTIONS_KEY (unsigned int,                   SwapDexCountThreshold)
80DEX2OAT_OPTIONS_KEY (unsigned int,                   VeryLargeAppThreshold)
81DEX2OAT_OPTIONS_KEY (std::string,                    AppImageFile)
82DEX2OAT_OPTIONS_KEY (int,                            AppImageFileFd)
83DEX2OAT_OPTIONS_KEY (bool,                           MultiImage)
84DEX2OAT_OPTIONS_KEY (std::string,                    NoInlineFrom)
85DEX2OAT_OPTIONS_KEY (Unit,                           ForceDeterminism)
86DEX2OAT_OPTIONS_KEY (std::string,                    ClasspathDir)
87DEX2OAT_OPTIONS_KEY (std::string,                    InvocationFile)
88DEX2OAT_OPTIONS_KEY (std::string,                    ClassLoaderContext)
89DEX2OAT_OPTIONS_KEY (std::string,                    ClassLoaderContextFds)
90DEX2OAT_OPTIONS_KEY (std::string,                    StoredClassLoaderContext)
91DEX2OAT_OPTIONS_KEY (std::string,                    DirtyImageObjects)
92DEX2OAT_OPTIONS_KEY (std::string,                    UpdatableBcpPackagesFile)
93DEX2OAT_OPTIONS_KEY (std::vector<std::string>,       RuntimeOptions)
94DEX2OAT_OPTIONS_KEY (std::string,                    CompilationReason)
95
96#undef DEX2OAT_OPTIONS_KEY
97