Lines Matching refs:options

155 bool write_dep_file(const Options& options, const AidlDefinedType& defined_type,  in write_dep_file()  argument
158 string dep_file_name = options.DependencyFile(); in write_dep_file()
159 if (dep_file_name.empty() && options.AutoDepFile()) { in write_dep_file()
180 options.TargetLanguage() == Options::Language::JAVA) { in write_dep_file()
190 if (!options.DependencyFileNinja()) { in write_dep_file()
199 if (options.IsCppOutput()) { in write_dep_file()
200 if (!options.DependencyFileNinja()) { in write_dep_file()
205 headers.push_back(options.OutputHeaderDir() + in write_dep_file()
220 string generate_outputFileName(const Options& options, const AidlDefinedType& defined_type) { in generate_outputFileName() argument
223 string result = options.OutputDir(); in generate_outputFileName()
239 if (options.TargetLanguage() == Options::Language::JAVA) { in generate_outputFileName()
241 } else if (options.IsCppOutput()) { in generate_outputFileName()
412 AidlError load_and_validate_aidl(const std::string& input_file_name, const Options& options, in load_and_validate_aidl() argument
438 for (const string& s : options.PreprocessedFiles()) { in load_and_validate_aidl()
449 ImportResolver import_resolver{io_delegate, input_file_name, options.ImportDirs(), in load_and_validate_aidl()
450 options.InputFiles()}; in load_and_validate_aidl()
512 for (const auto& imported_file : options.ImportFiles()) { in load_and_validate_aidl()
525 const bool is_check_api = options.GetTask() == Options::Task::CHECK_API; in load_and_validate_aidl()
576 if (!defined_type->LanguageSpecificCheckValid(*typenames, options.TargetLanguage())) { in load_and_validate_aidl()
585 bool isStable = unstructuredParcelable->IsStableApiParcelable(options.TargetLanguage()); in load_and_validate_aidl()
586 if (options.IsStructured() && !isStable) { in load_and_validate_aidl()
592 if (options.FailOnParcelable()) { in load_and_validate_aidl()
605 if (options.GetStability() != Options::Stability::VINTF) { in load_and_validate_aidl()
610 if (!options.IsStructured()) { in load_and_validate_aidl()
641 if (options.Version() > 0) { in load_and_validate_aidl()
652 if (!options.Hash().empty()) { in load_and_validate_aidl()
694 if (options.IsStructured() && type.AsUnstructuredParcelable() != nullptr && in load_and_validate_aidl()
695 !type.AsUnstructuredParcelable()->IsStableApiParcelable(options.TargetLanguage())) { in load_and_validate_aidl()
700 if (options.GetStability() == Options::Stability::VINTF && !type.IsVintfStability()) { in load_and_validate_aidl()
707 if (options.IsStructured()) { in load_and_validate_aidl()
754 int compile_aidl(const Options& options, const IoDelegate& io_delegate) { in compile_aidl() argument
755 const Options::Language lang = options.TargetLanguage(); in compile_aidl()
756 for (const string& input_file : options.InputFiles()) { in compile_aidl()
761 AidlError aidl_err = internals::load_and_validate_aidl(input_file, options, io_delegate, in compile_aidl()
763 bool allowError = aidl_err == AidlError::FOUND_PARCELABLE && !options.FailOnParcelable(); in compile_aidl()
771 string output_file_name = options.OutputFile(); in compile_aidl()
773 if (output_file_name.empty() && !options.OutputDir().empty()) { in compile_aidl()
774 output_file_name = generate_outputFileName(options, *defined_type); in compile_aidl()
780 if (!write_dep_file(options, *defined_type, imported_files, io_delegate, input_file, in compile_aidl()
788 cpp::GenerateCpp(output_file_name, options, typenames, *defined_type, io_delegate); in compile_aidl()
790 ndk::GenerateNdk(output_file_name, options, typenames, *defined_type, io_delegate); in compile_aidl()
798 io_delegate, options); in compile_aidl()
812 bool dump_mappings(const Options& options, const IoDelegate& io_delegate) { in dump_mappings() argument
814 for (const string& input_file : options.InputFiles()) { in dump_mappings()
818 AidlError aidl_err = internals::load_and_validate_aidl(input_file, options, io_delegate, in dump_mappings()
832 auto code_writer = io_delegate.GetCodeWriter(options.OutputFile()); in dump_mappings()
837 bool preprocess_aidl(const Options& options, const IoDelegate& io_delegate) { in preprocess_aidl() argument
838 unique_ptr<CodeWriter> writer = io_delegate.GetCodeWriter(options.OutputFile()); in preprocess_aidl()
840 for (const auto& file : options.InputFiles()) { in preprocess_aidl()
856 static string GetApiDumpPathFor(const AidlDefinedType& defined_type, const Options& options) { in GetApiDumpPathFor() argument
858 CHECK(!options.OutputDir().empty() && options.OutputDir().back() == '/'); in GetApiDumpPathFor()
859 return options.OutputDir() + package_as_path + OS_PATH_SEPARATOR + defined_type.GetName() + in GetApiDumpPathFor()
863 bool dump_api(const Options& options, const IoDelegate& io_delegate) { in dump_api() argument
864 for (const auto& file : options.InputFiles()) { in dump_api()
866 if (internals::load_and_validate_aidl(file, options, io_delegate, &typenames, nullptr) == in dump_api()
870 io_delegate.GetCodeWriter(GetApiDumpPathFor(*type, options)); in dump_api()
883 int aidl_entry(const Options& options, const IoDelegate& io_delegate) { in aidl_entry() argument
887 switch (options.GetTask()) { in aidl_entry()
889 ret = android::aidl::compile_aidl(options, io_delegate); in aidl_entry()
892 ret = android::aidl::preprocess_aidl(options, io_delegate) ? 0 : 1; in aidl_entry()
895 ret = android::aidl::dump_api(options, io_delegate) ? 0 : 1; in aidl_entry()
898 ret = android::aidl::check_api(options, io_delegate) ? 0 : 1; in aidl_entry()
901 ret = android::aidl::dump_mappings(options, io_delegate) ? 0 : 1; in aidl_entry()
905 << "Unrecognized task: " << static_cast<size_t>(options.GetTask()); in aidl_entry()