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 (std::string, CompactDexLevel) 38DEX2OAT_OPTIONS_KEY (std::vector<std::string>, DexFiles) 39DEX2OAT_OPTIONS_KEY (std::vector<std::string>, DexLocations) 40DEX2OAT_OPTIONS_KEY (std::vector<int>, DexFds) 41DEX2OAT_OPTIONS_KEY (int, ZipFd) 42DEX2OAT_OPTIONS_KEY (std::string, ZipLocation) 43DEX2OAT_OPTIONS_KEY (int, InputVdexFd) 44DEX2OAT_OPTIONS_KEY (std::string, InputVdex) 45DEX2OAT_OPTIONS_KEY (int, OutputVdexFd) 46DEX2OAT_OPTIONS_KEY (std::string, OutputVdex) 47DEX2OAT_OPTIONS_KEY (int, DmFd) 48DEX2OAT_OPTIONS_KEY (std::string, DmFile) 49DEX2OAT_OPTIONS_KEY (std::string, OatFile) 50DEX2OAT_OPTIONS_KEY (std::string, OatSymbols) 51DEX2OAT_OPTIONS_KEY (Unit, Strip) 52DEX2OAT_OPTIONS_KEY (int, OatFd) 53DEX2OAT_OPTIONS_KEY (std::string, OatLocation) 54DEX2OAT_OPTIONS_KEY (bool, Watchdog) 55DEX2OAT_OPTIONS_KEY (int, WatchdogTimeout) 56DEX2OAT_OPTIONS_KEY (unsigned int, Threads) 57DEX2OAT_OPTIONS_KEY (ParseIntList<','>, CpuSet) 58DEX2OAT_OPTIONS_KEY (std::string, ImageFilename) 59DEX2OAT_OPTIONS_KEY (int, ImageFd) 60DEX2OAT_OPTIONS_KEY (ImageHeader::StorageMode, ImageFormat) 61DEX2OAT_OPTIONS_KEY (std::string, Passes) 62DEX2OAT_OPTIONS_KEY (std::string, Base) // TODO: Hex string parsing. 63DEX2OAT_OPTIONS_KEY (std::string, BootImage) 64DEX2OAT_OPTIONS_KEY (Unit, ForceJitZygote) 65DEX2OAT_OPTIONS_KEY (std::string, AndroidRoot) 66DEX2OAT_OPTIONS_KEY (InstructionSet, TargetInstructionSet) 67DEX2OAT_OPTIONS_KEY (std::string, TargetInstructionSetVariant) 68DEX2OAT_OPTIONS_KEY (std::string, TargetInstructionSetFeatures) 69DEX2OAT_OPTIONS_KEY (std::vector<std::string>, Profile) 70DEX2OAT_OPTIONS_KEY (std::vector<int>, ProfileFd) 71DEX2OAT_OPTIONS_KEY (Unit, Host) 72DEX2OAT_OPTIONS_KEY (Unit, DumpTiming) 73DEX2OAT_OPTIONS_KEY (Unit, DumpPasses) 74DEX2OAT_OPTIONS_KEY (Unit, DumpStats) 75DEX2OAT_OPTIONS_KEY (linker::CopyOption, CopyDexFiles) 76DEX2OAT_OPTIONS_KEY (Unit, AvoidStoringInvocation) 77DEX2OAT_OPTIONS_KEY (std::string, SwapFile) 78DEX2OAT_OPTIONS_KEY (int, SwapFileFd) 79DEX2OAT_OPTIONS_KEY (unsigned int, SwapDexSizeThreshold) 80DEX2OAT_OPTIONS_KEY (unsigned int, SwapDexCountThreshold) 81DEX2OAT_OPTIONS_KEY (unsigned int, VeryLargeAppThreshold) 82DEX2OAT_OPTIONS_KEY (std::string, AppImageFile) 83DEX2OAT_OPTIONS_KEY (int, AppImageFileFd) 84DEX2OAT_OPTIONS_KEY (bool, MultiImage) 85DEX2OAT_OPTIONS_KEY (std::string, NoInlineFrom) 86DEX2OAT_OPTIONS_KEY (Unit, ForceDeterminism) 87DEX2OAT_OPTIONS_KEY (std::string, ClasspathDir) 88DEX2OAT_OPTIONS_KEY (std::string, InvocationFile) 89DEX2OAT_OPTIONS_KEY (std::string, ClassLoaderContext) 90DEX2OAT_OPTIONS_KEY (std::string, ClassLoaderContextFds) 91DEX2OAT_OPTIONS_KEY (std::string, StoredClassLoaderContext) 92DEX2OAT_OPTIONS_KEY (std::string, DirtyImageObjects) 93DEX2OAT_OPTIONS_KEY (int, DirtyImageObjectsFd) 94DEX2OAT_OPTIONS_KEY (std::string, UpdatableBcpPackagesFile) 95DEX2OAT_OPTIONS_KEY (int, UpdatableBcpPackagesFd) 96DEX2OAT_OPTIONS_KEY (std::vector<std::string>, RuntimeOptions) 97DEX2OAT_OPTIONS_KEY (std::string, CompilationReason) 98DEX2OAT_OPTIONS_KEY (Unit, CheckLinkageConditions) 99DEX2OAT_OPTIONS_KEY (Unit, CrashOnLinkageViolation) 100DEX2OAT_OPTIONS_KEY (Unit, CompileIndividually) 101DEX2OAT_OPTIONS_KEY (std::string, PublicSdk) 102DEX2OAT_OPTIONS_KEY (Unit, ForceAllowOjInlines) 103DEX2OAT_OPTIONS_KEY (std::string, ApexVersions) 104DEX2OAT_OPTIONS_KEY (Unit, ForcePaletteCompilationHooks) 105DEX2OAT_OPTIONS_KEY (std::vector<std::string>, PreloadedClasses) 106DEX2OAT_OPTIONS_KEY (std::vector<int>, PreloadedClassesFds) 107 108#undef DEX2OAT_OPTIONS_KEY 109