codegen_options.h 768 B

1234567891011121314151617181920212223242526
  1. // Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. // Exceptions. See /LICENSE for license information.
  3. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. #ifndef CARBON_TOOLCHAIN_DRIVER_CODEGEN_OPTIONS_H_
  5. #define CARBON_TOOLCHAIN_DRIVER_CODEGEN_OPTIONS_H_
  6. #include "common/command_line.h"
  7. #include "llvm/ADT/StringRef.h"
  8. #include "llvm/TargetParser/Host.h"
  9. namespace Carbon {
  10. // Shared codegen-related options.
  11. //
  12. // See the implementation of `Build` for documentation on members.
  13. struct CodegenOptions {
  14. auto Build(CommandLine::CommandBuilder& b) -> void;
  15. std::string host = llvm::sys::getDefaultTargetTriple();
  16. llvm::StringRef target;
  17. };
  18. } // namespace Carbon
  19. #endif // CARBON_TOOLCHAIN_DRIVER_CODEGEN_OPTIONS_H_