dub.compilers.utils

Utility functionality for compiler class implementations.

Members

Functions

dmdLikeVersionToSemverLike
string dmdLikeVersionToSemverLike(string ver)

Turn a DMD-like version (e.g. 2.082.1) into a SemVer-like version (e.g. 2.82.1). The function accepts a dependency operator prefix and some text postfix. Prefix and postfix are returned verbatim.

enforceBuildRequirements
void enforceBuildRequirements(BuildSettings settings)

Alters the build options to comply with the specified build requirements.

generatePlatformProbeFile
NativePath generatePlatformProbeFile()

Generate a file that will give, at compile time, information about the compiler (architecture, frontend version...)

isLinkerFile
bool isLinkerFile(BuildPlatform platform, string f)

Determines if a specific file name has the extension of a linker file.

readPlatformJsonProbe
BuildPlatform readPlatformJsonProbe(string output)

Processes the JSON output generated by compiling the platform probe file.

resolveLibs
void resolveLibs(BuildSettings settings, BuildPlatform platform)

Replaces each referenced import library by the appropriate linker flags.

warnOnSpecialCompilerFlags
void warnOnSpecialCompilerFlags(string[] compiler_flags, BuildOptions options, string package_name, string config_name)

Searches the given list of compiler flags for ones that have a generic equivalent.

Meta

License

Subject to the terms of the MIT license, as written in the included LICENSE.txt file.

Authors

Sönke Ludwig