Closed
Description
Currently we have the following class:
abstract final class CCompilerConfig {
/// Path to a C compiler.
Uri? get compiler;
/// Path to a native linker.
Uri? get linker;
/// Path to a native archiver.
Uri? get archiver;
/// Path to script that sets environment variables for [compiler], [linker],
/// and [archiver].
Uri? get envScript;
/// Arguments for [envScript].
List<String>? get envScriptArgs;
factory CCompilerConfig({
Uri? archiver,
Uri? compiler,
Uri? linker,
Uri? envScript,
List<String>? envScriptArgs,
}) = CCompilerConfigImpl;
}
It is very weird to have envScript
and envScriptArgs
here. It seems that windows-specific details are being exposed by this API.
We should consider removing these two fields and instead do that differently:
- Either add a
class CCompilerConfig { final Map<String, String> environmentVariables; }
that encapsulate the additional environment variables needed when invokingCCompilerConfig.{compiler,linker,archiver}
- Or have no replacement: The caller can figure out the additional environment, make wrapper-shell scripts for compiler/linker/archiver. Those wrapper shell scripts can set the needed environment and call the actual target compiler/linker/archiver
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Done