public enum CrateType extends Enum<CrateType>
Enum Constant and Description |
---|
BIN |
CDYLIB |
CHECK |
CHECKBIN |
DYLIB |
LIB |
PROC_MACRO |
RLIB |
RLIB_PIC |
SAVEANALYSIS |
SAVEANALYSISBIN |
STATIC |
STATIC_PIC |
Modifier and Type | Method and Description |
---|---|
String |
filenameFor(BuildTarget target,
String name,
CxxPlatform cxxPlatform)
Return an appropriate filename for this crate, given its type and the platform.
|
Flavor |
getFlavor() |
boolean |
isCheck()
We're just checking the code, and generating metadata to allow dependents to check.
|
boolean |
isDynamic()
Crate dynamically links with its dependents.
|
boolean |
isExecutable()
Create generates an executable
|
boolean |
isNative()
Return true if this crate type is intended to be a native output (ie, not intended for further
processing by the Rust toolchain).
|
boolean |
isPic()
Crate needs to be compiled with relocation-model=pic.
|
boolean |
isProcMacro()
Return true if this is generating a compiler plugin - ie, it should be linked with a different
linker and linker flags.
|
boolean |
isSaveAnalysis()
Save-analysis is a more detailed version of check, which saves full type and other information
in a json file for consumption by other tools (namely RLS).
|
boolean |
needAllDeps()
Linking this crate needs all the dependencies available.
|
String |
toString() |
static CrateType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static CrateType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final CrateType BIN
public static final CrateType CHECK
public static final CrateType CHECKBIN
public static final CrateType SAVEANALYSIS
public static final CrateType SAVEANALYSISBIN
public static final CrateType LIB
public static final CrateType RLIB
public static final CrateType RLIB_PIC
public static final CrateType DYLIB
public static final CrateType CDYLIB
public static final CrateType STATIC
public static final CrateType STATIC_PIC
public static final CrateType PROC_MACRO
public static CrateType[] values()
for (CrateType c : CrateType.values()) System.out.println(c);
public static CrateType valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic Flavor getFlavor()
public boolean isNative()
public boolean needAllDeps()
public boolean isDynamic()
public boolean isPic()
public boolean isExecutable()
public boolean isCheck()
public boolean isSaveAnalysis()
public boolean isProcMacro()
public String filenameFor(BuildTarget target, String name, CxxPlatform cxxPlatform)
name
- Base filenamecxxPlatform
- Platform we're building for