mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
I'm separating the options out so that it's easier to review. They include a lot of boilerplate text that I think won't change much, and makes it harder to review changes. To explain filename differences, whereas `CodegenOptions` is shared (by link and compile), `LinkOptions` and `CompileOptions` are subcommand-specific. I'm planning to separate out the subcommands, so I'm putting those in respective subcommand files. I'm still going to try to use the `.h` to declare the interface, `.cpp` for bigger implementation details (for better or worse, including comments on options). I'm also moving out corresponding Driver members to help shrink deltas when refactoring. That is, the bodies aren't changing here, but a refactoring of commands will make some changes. By moving the code to different files now, it should be easier to identify what's changing later. --------- Co-authored-by: Geoff Romer <gromer@google.com>
31 lines
902 B
C++
31 lines
902 B
C++
// Part of the Carbon Language project, under the Apache License v2.0 with LLVM
|
|
// Exceptions. See /LICENSE for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
|
|
#ifndef CARBON_TOOLCHAIN_DRIVER_LINK_SUBCOMMAND_H_
|
|
#define CARBON_TOOLCHAIN_DRIVER_LINK_SUBCOMMAND_H_
|
|
|
|
#include "common/command_line.h"
|
|
#include "llvm/ADT/SmallVector.h"
|
|
#include "llvm/ADT/StringRef.h"
|
|
#include "toolchain/driver/codegen_options.h"
|
|
|
|
namespace Carbon {
|
|
|
|
// Options for the link subcommand.
|
|
//
|
|
// See the implementation of `Build` for documentation on members.
|
|
struct LinkOptions {
|
|
static const CommandLine::CommandInfo Info;
|
|
|
|
auto Build(CommandLine::CommandBuilder& b, CodegenOptions& codegen_options)
|
|
-> void;
|
|
|
|
llvm::StringRef output_filename;
|
|
llvm::SmallVector<llvm::StringRef> object_filenames;
|
|
};
|
|
|
|
} // namespace Carbon
|
|
|
|
#endif // CARBON_TOOLCHAIN_DRIVER_LINK_SUBCOMMAND_H_
|