/*
 * Copyright (C) 2017 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License")
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef COMPILER_OPTIONS_KEY
#error "Please #define COMPILER_OPTIONS_KEY before #including this file"
#define COMPILER_OPTIONS_KEY(...)  // Don't display errors in this file in IDEs.
#endif

// This file defines the list of keys for CompilerOptionsMap.
// These can be used with CompilerOptionsMap.Get/Set/etc, once that template class has been
// instantiated.
//
// Column Descriptions:
//                    <<Type>>                     <<Key Name>>                  (<<Default Value>>)
//
// Default values are only used by Map::GetOrDefault(K<T>).
// If a default value is omitted here, T{} is used as the default value, which is
// almost-always the value of the type as if it was memset to all 0.
//
// Please keep the columns aligned if possible when adding new rows.
//

// Parse-able keys from the command line.

// TODO: Add type parser.
COMPILER_OPTIONS_KEY (CompilerFilter::Filter,      CompilerFilter)
COMPILER_OPTIONS_KEY (bool,                        CompileArtTest)
COMPILER_OPTIONS_KEY (Unit,                        PIC)
COMPILER_OPTIONS_KEY (unsigned int,                HugeMethodMaxThreshold)
COMPILER_OPTIONS_KEY (unsigned int,                InlineMaxCodeUnitsThreshold)
COMPILER_OPTIONS_KEY (bool,                        GenerateDebugInfo)
COMPILER_OPTIONS_KEY (bool,                        GenerateMiniDebugInfo)
COMPILER_OPTIONS_KEY (bool,                        GenerateBuildID)
COMPILER_OPTIONS_KEY (Unit,                        Debuggable)
COMPILER_OPTIONS_KEY (Unit,                        Baseline)
COMPILER_OPTIONS_KEY (Unit,                        ProfileBranches)
COMPILER_OPTIONS_KEY (bool,                        AbortOnHardVerifierFailure)
COMPILER_OPTIONS_KEY (bool,                        AbortOnSoftVerifierFailure)
COMPILER_OPTIONS_KEY (bool,                        ResolveStartupConstStrings, false)
COMPILER_OPTIONS_KEY (bool,                        InitializeAppImageClasses, false)
COMPILER_OPTIONS_KEY (std::string,                 DumpInitFailures)
COMPILER_OPTIONS_KEY (std::string,                 DumpCFG)
COMPILER_OPTIONS_KEY (Unit,                        DumpCFGAppend)
// TODO: Add type parser.
COMPILER_OPTIONS_KEY (std::string,                 RegisterAllocationStrategy)
COMPILER_OPTIONS_KEY (ParseStringList<','>,        VerboseMethods)
COMPILER_OPTIONS_KEY (bool,                        DeduplicateCode,            true)
COMPILER_OPTIONS_KEY (Unit,                        CountHotnessInCompiledCode)
COMPILER_OPTIONS_KEY (ProfileMethodsCheck,         CheckProfiledMethods)
COMPILER_OPTIONS_KEY (Unit,                        DumpTimings)
COMPILER_OPTIONS_KEY (Unit,                        DumpPassTimings)
COMPILER_OPTIONS_KEY (Unit,                        DumpStats)
COMPILER_OPTIONS_KEY (unsigned int,                MaxImageBlockSize)

#undef COMPILER_OPTIONS_KEY
