Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove CCompiler.{envScript,envScriptArgs} and replace by other means #1606

Open
mkustermann opened this issue Sep 26, 2024 · 12 comments
Open
Assignees

Comments

@mkustermann
Copy link
Member

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 invoking CCompilerConfig.{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
@mkustermann
Copy link
Member Author

/cc @dcharkes For discussion

@dcharkes
Copy link
Collaborator

The way that the Windows commandline compiler works is that you're supposed to launch a different shell, that has all these env-vars set (including where to find standard libraries.)

  • Or have no replacement:

Every user will have to do that, that sounds horrible. Without the env vars basically no compilation can succeed.

  • Either add a class CCompilerConfig { final Map<String, String> environmentVariables; } that encapsulate the additional environment variables needed when invoking CCompilerConfig.{compiler,linker,archiver}

That could work, but that requires us to do this in multiple places:

  1. flutter tools (or native_assets_builder, but we don't use it in Dartdev because we don't have a predefined compiler there.)
  2. Dart CI

So the hacky code that runs the bash script to extract the vars would live in multiple places instead of one.

Not sure if that's cleaner or worse than the current solution.

@mkustermann
Copy link
Member Author

That could work, but that requires us to do this in multiple places:

I could imagine having some helper function somewhere that invokes this envScript with envScriptArgs, sees what environment needs to be set and returns a Map<String, String>.

That shared helper can be used by all bundling tools (of which there's very few) when determining the CCompilerConfig.

To me this seems better than exposing CCompilerConfig.{envScript,envScriptArgs} in the build/hook.dart APIs (which will be seen by many package authors and - similar to me - some may be very confused what those two getters mean, when they have to be used, ...)

@dcharkes
Copy link
Collaborator

Another consideration is doing unneeded work if no code assets are built. If we do this inside flutter_tools, we'll need to always run it.

If we always invoke the script we should consider just putting the environment variables into the environment the hook is invoked with. Then we can completely omit a CompilerConfig.environment that users might forget to pass into Process.run.

@dcharkes dcharkes added this to the Native Assets v1.0 milestone Dec 11, 2024
@dcharkes
Copy link
Collaborator

dcharkes commented Dec 11, 2024

If we always invoke the script we should consider just putting the environment variables into the environment the hook is invoked with. Then we can completely omit a CompilerConfig.environment that users might forget to pass into Process.run.

It feels a bit weird though that we would add env vars to be able to run executables, but we don't also simply prepend the directory with the executables to the path. E.g. the environment we decide to pass in becomes part of the contract for config.code if config.buildCodeAssets == true, but the environment is something like a top-level thing. (Both the JSON config and the environment are toplevels in and of themselves and are both part of the protocol.)

It seems that windows-specific details are being exposed by this API.

Either way, we have windows-specific details in the API, either in the CCompilierConfig or in the (somewhat hidden) environment variables.

Completely removing them is also ugly. We'd be providing half the information needed to run the C compiler. We should provide all or none. And none doesn't work either because we'd like the C code to be compiled with the same C compiler as the Flutter native app is compiled.

@mkustermann
Copy link
Member Author

To me all options on the table seem better then status quo with envScript / envScriptArgs:

  • make wrapper shell scripts that populate the environment and call real compiler
  • make CompilerConfig.environment
  • include env vars in hook invocation

Maybe we can do some research how others solve this issue?

Another consideration is doing unneeded work if no code assets are built. If we do this inside flutter_tools, we'll need to always run it.

Well flutter tools always runs % which clang and other things already. And it's going to have to do that only once per flutter X invocation (compared to N invocations of hooks)

@dcharkes
Copy link
Collaborator

Maybe we can do some research how others solve this issue?

CMake seems to require vcvars.bat to have been called already, so that the environment variables are already set. And people try to jump through all kinds of hoops to try to make their CMake still work if it wasn't set.

In the Dart SDK GN build files we jump through those kind of hoops to extract the vcvars into the environment in build/toolchain/win/BUILD.gn.

We have two cases:

  1. The C Compiler is provided by the embedder/launcher (flutter_tools/Dart SDK).
  2. No C Compiler is provided by the embedder/launcher, so package:native_toolchain_c scans the host machine to find one.

Case (2) is similar to what we do in the SDK, nothing is provided from the outside, just figure it out yourself. Of course this means config.cCompiler is simply omitted.

Case (1) is most similar to XCode and VS calling cl.exe with the right environment. So, include env vars in hook invocation. The hook invoker provides a direct path to cl.exe so the environment it provides to the hook should have everything to run cl.exe.

@dcharkes dcharkes self-assigned this Dec 19, 2024
@dcharkes dcharkes moved this to In Progress in Native Assets Dec 19, 2024
@mkustermann
Copy link
Member Author

Thanks for the investigation, @dcharkes !

So it sounds like nobody else is doing what we currently do (i.e. passing along the cc/... as well as envScript and envScriptArgs)? So either one passes cc with right environment vars already set or lets the thing figure it out. That's somewhat aligned with what I was also thinking.

@dcharkes
Copy link
Collaborator

dcharkes commented Jan 9, 2025

So either one passes cc with right environment vars already

As noted in #1739 (comment): If we change the input.config.code to be multi-arch, we must pass the environment in the CodeConfig per arch and make package:native_toolchain_c add that to the process invocation of the external tool. Setting it as environment variables to the hook invocation only works if hook invocations 1-1 map to msvc invocations.

CompilerConfig.environment

One quirk is that PATH is modified, so if Flutter were to modify PATH as well on the hook invocation for some reason, then those modifications are overwritten in package:native_toolchain_c. Also, every time PATH changes unrelated to MSVC, the checksum would change which is unfortunate.

Postponing the modification of PATH by only running the batch script inside the hook instead of before it avoids this issue. Which would be more along the line of

make wrapper shell scripts that populate the environment and call real compiler

Or, more along the lines of the current situation, which we are trying to get rid of.

Or, more along the lines of not passing the env-script and trying to find it based on the cl.exe path, which relies on Microsoft not changing the relative install locations:

final vcDir = toolInstance.uri.resolve('../../../../../../');
final batchScript = vcDir.resolve('Auxiliary/Build/$fileName');

(But it would be rather weird that flutter_tools would navigate to cl.exe provide a path to that but not provide a path to vcvars.bat or run vcvars.bat to set up the environment correctly.)

For reference, the modified environment variables:

CommandPromptType=Native
DevEnvDir=C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\
ExtensionSdkDir=C:\Program Files (x86)\Microsoft SDKs\Windows Kits\10\ExtensionSDKs
EXTERNAL_INCLUDE=C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\include;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\ATLMFC\include;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\VS\include;C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt;C:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\um;C:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\shared;C:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\winrt;C:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\cppwinrt;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um
Framework40Version=v4.0
FrameworkDir=C:\Windows\Microsoft.NET\Framework\
FrameworkDir32=C:\Windows\Microsoft.NET\Framework\
FrameworkVersion=v4.0.30319
FrameworkVersion32=v4.0.30319
INCLUDE=C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\include;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\ATLMFC\include;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\VS\include;C:\Program Files 
(x86)\Windows Kits\10\include\10.0.22000.0\ucrt;C:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\um;C:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\shared;C:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\winrt;C:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\cppwinrt;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um
LIB=C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\ATLMFC\lib\x86;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\lib\x86;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\lib\um\x86;C:\Program Files (x86)\Windows Kits\10\lib\10.0.22000.0\ucrt\x86;C:\Program Files (x86)\Windows Kits\10\\lib\10.0.22000.0\\um\x86
LIBPATH=C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\ATLMFC\lib\x86;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\lib\x86;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\lib\x86\store\references;C:\Program Files (x86)\Windows Kits\10\UnionMetadata\10.0.22000.0;C:\Program Files (x86)\Windows Kits\10\References\10.0.22000.0;C:\Windows\Microsoft.NET\Framework\v4.0.30319
NETFXSDKDir=C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\
PATH=C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\bin\HostX86\x86;C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\VC\VCPackages;C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\TestWindow;C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer;C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\bin\Roslyn;C:\Program Files\Microsoft Visual Studio\2022\Community\Team Tools\Performance Tools;C:\Program Files (x86)\Microsoft Visual Studio\Shared\Common\VSPerfCollectionTools\vs2019\;C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\;C:\Program Files (x86)\Windows Kits\10\bin\10.0.22000.0\\x86;C:\Program Files (x86)\Windows Kits\10\bin\\x86;C:\Program Files\Microsoft Visual Studio\2022\Community\\MSBuild\Current\Bin\amd64;C:\Windows\Microsoft.NET\Framework\v4.0.30319;C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\;C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools\;C:\src\flt\engine\flutter\bin\;C:\Users\dacoharkes\AppData\Local\Programs\Python\Python310\Scripts\;C:\Users\dacoharkes\AppData\Local\Programs\Python\Python310\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\ProgramData\GooGet;C:\Program Files\Google\Compute Engine\metadata_scripts;C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\bin;C:\Program Files\Google\Compute Engine\sysprep;C:\Program Files\Google\hostidentity;C:\gnubby\bin;C:\ProgramData\Diagnose_me;C:\Program Files\gWindows-Updater;C:\Program Files (x86)\Corp SSH Helper;C:\Program Files\Google\Diagnose_me;C:\Program Files (x86)\Google\gWindowsInformation;C:\Program Files\Google\st_tools;C:\ProgramData\chocolatey\bin;C:\Program Files\Git Google Extras;C:\Program Files\OpenSSH;C:\Program Files\Puppet Labs\Puppet\bin;C:\Program Files\Google\beyondcorp-dns;C:\Program Files\Git\cmd;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Go\bin;C:\Program Files\Google\sendsysinfo;C:\Program Files\Google\fix;%GooGetRoot%;C:\Program Files\Google\Cabbie;C:\Users\dacoharkes\AppData\Local\Programs\Python\Python310\Scripts\;C:\Users\dacoharkes\AppData\Local\Programs\Python\Python310\;C:\Users\dacoharkes\AppData\Local\Microsoft\WindowsApps;C:\src\depot_tools;C:\Program Files\Git\bin;C:\src\flt\engine\flutter\bin;C:\tools\dart-sdk\bin;C:\Users\dacoharkes\AppData\Roaming\Pub\Cache\bin;C:\Users\dacoharkes\AppData\Local\Programs\Microsoft VS Code\bin;C:\tools\flutter\bin;;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\Llvm\bin;C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin;C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja;C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\VC\Linux\bin\ConnectionManagerExe
Platform=x86
UCRTVersion=10.0.22000.0
UniversalCRTSdkDir=C:\Program Files (x86)\Windows Kits\10\
VCIDEInstallDir=C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\VC\
VCINSTALLDIR=C:\Program Files\Microsoft Visual Studio\2022\Community\VC\
VCToolsInstallDir=C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\
VCToolsRedistDir=C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Redist\MSVC\14.34.31931\
VCToolsVersion=14.35.32215
VisualStudioVersion=17.0
VS170COMNTOOLS=C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools\
VSCMD_ARG_app_plat=Desktop
VSCMD_ARG_HOST_ARCH=x86
VSCMD_ARG_TGT_ARCH=x86
VSCMD_VER=17.5.4
VSINSTALLDIR=C:\Program Files\Microsoft Visual Studio\2022\Community\
WindowsLibPath=C:\Program Files (x86)\Windows Kits\10\UnionMetadata\10.0.22000.0;C:\Program Files (x86)\Windows Kits\10\References\10.0.22000.0   
WindowsSdkBinPath=C:\Program Files (x86)\Windows Kits\10\bin\
WindowsSdkDir=C:\Program Files (x86)\Windows Kits\10\
WindowsSDKLibVersion=10.0.22000.0\
WindowsSdkVerBinPath=C:\Program Files (x86)\Windows Kits\10\bin\10.0.22000.0\
WindowsSDKVersion=10.0.22000.0\
WindowsSDK_ExecutablePath_x64=C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\x64\
WindowsSDK_ExecutablePath_x86=C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\
__DOTNET_ADD_32BIT=1
__DOTNET_PREFERRED_BITNESS=32
__VSCMD_PREINIT_PATH=C:\src\flt\engine\flutter\bin\;C:\Users\dacoharkes\AppData\Local\Programs\Python\Python310\Scripts\;C:\Users\dacoharkes\AppData\Local\Programs\Python\Python310\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\ProgramData\GooGet;C:\Program Files\Google\Compute Engine\metadata_scripts;C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\bin;C:\Program Files\Google\Compute Engine\sysprep;C:\Program Files\Google\hostidentity;C:\gnubby\bin;C:\ProgramData\Diagnose_me;C:\Program Files\gWindows-Updater;C:\Program Files (x86)\Corp SSH Helper;C:\Program Files\Google\Diagnose_me;C:\Program Files (x86)\Google\gWindowsInformation;C:\Program Files\Google\st_tools;C:\ProgramData\chocolatey\bin;C:\Program Files\Git Google Extras;C:\Program Files\OpenSSH;C:\Program Files\Puppet Labs\Puppet\bin;C:\Program Files\Google\beyondcorp-dns;C:\Program Files\Git\cmd;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Go\bin;C:\Program Files\Google\sendsysinfo;C:\Program Files\Google\fix;%GooGetRoot%;C:\Program Files\Google\Cabbie;C:\Users\dacoharkes\AppData\Local\Programs\Python\Python310\Scripts\;C:\Users\dacoharkes\AppData\Local\Programs\Python\Python310\;C:\Users\dacoharkes\AppData\Local\Microsoft\WindowsApps;C:\src\depot_tools;C:\Program Files\Git\bin;C:\src\flt\engine\flutter\bin;C:\tools\dart-sdk\bin;C:\Users\dacoharkes\AppData\Roaming\Pub\Cache\bin;C:\Users\dacoharkes\AppData\Local\Programs\Microsoft VS Code\bin;C:\tools\flutter\bin;

@dcharkes
Copy link
Collaborator

Another thought: The gcc/clang abstraction with having 3 executables is also kind of leaking out. Not every native toolchain will have this separation of 3 executables.

In package:native_toolchain_c we reverse engineer from the the path to the executable and calling the executable with --help which compiler it is. And we pass different arguments/flags based on which compiler it is. Providing a wrapper shell script that sets up the environment variables for cl.exe would make the recognition of compilers harder. And maybe there are other reasons to wrap compilers (e.g. RBE and GOMA are also wrappers).

To avoid having to reverse engineer what compiler is provided, maybe we should embrace specifying which compiler it is and change the compiler config to:

input.config.code.cCompiler.compiler: 'clang'
input.config.code.cCompiler.clang.cc: 'path/to/clang'
input.config.code.cCompiler.clang.ld: 'path/to/lld.ld'
input.config.code.cCompiler.clang.ar: 'path/to/ar'

This would prevent package:native_toolchain_c to have to reverse engineer what the compiler is. And it would also allow for passing multiple native tools as fallbacks.

If we go that route, then it's not so much of a leak anymore if we do pas envScript for cl.exe. And neither would it be hard to know that we have to pass the msvc flags for some random foo.bat script that happens to wrap cl.exe.

(We do have to specify which of the two options it is though, otherwise the embedders and package:native_toolchain_c (and alternatives) don't work well together.)

@dcharkes
Copy link
Collaborator

dcharkes commented Jan 13, 2025

How precise for clang compilers?

If we go into the direction of making explicit which c-compiler is being passed in the CCompilerConfig, then how precise should we go? All clang-like compilers under 'clang' or per compiler family?

input.config.code.cCompiler.compiler: 'clang' // or 'msvc'
input.config.code.cCompiler.clang.compiler: 'path/to/clang'
input.config.code.cCompiler.clang.linker: 'path/to/ld.lld'
input.config.code.cCompiler.clang.archiver: 'path/to/llvm-ar'
input.config.code.cCompiler.msvc.compiler: 'path/to/cl.exe'
input.config.code.cCompiler.msvc.linker: 'path/to/link.exe'
input.config.code.cCompiler.msvc.archiver: 'path/to/lib.exe'
input.config.code.cCompiler.msvc.archiver: 'path/to/lib.exe'
input.config.code.cCompiler.msvc.vcvars: 'path/to/vcvars64.bat'

vs

input.config.code.cCompiler.compiler: 'clang' // 'apple', 'gcc', 'ndk', 'msvc'
input.config.code.cCompiler.apple.compiler: 'path/to/clang'
input.config.code.cCompiler.apple.linker: 'path/to/ld'
input.config.code.cCompiler.apple.archiver: 'path/to/ar'
input.config.code.cCompiler.clang.compiler: 'path/to/clang'
input.config.code.cCompiler.clang.linker: 'path/to/ld.lld'
input.config.code.cCompiler.clang.archiver: 'path/to/llvm-ar'
input.config.code.cCompiler.gcc.compiler: 'path/to/x86_64-linux-gnu-gcc'
input.config.code.cCompiler.gcc.linker: 'path/to/x86_64-linux-gnu-ld'
input.config.code.cCompiler.gcc.archiver: 'path/to/x86_64-linux-gnu-gcc-ar'
input.config.code.cCompiler.msvc.compiler: 'path/to/cl.exe'
input.config.code.cCompiler.msvc.linker: 'path/to/link.exe'
input.config.code.cCompiler.msvc.archiver: 'path/to/lib.exe'
input.config.code.cCompiler.msvc.vcvars: 'path/to/vcvars64.bat'
input.config.code.cCompiler.ndk.compiler: 'path/to/clang'
input.config.code.cCompiler.ndk.linker: 'path/to/ld.lld'
input.config.code.cCompiler.ndk.archiver: 'path/to/llvm-ar'

Specifying the compiler family input.config.code.cCompiler.compiler + the target architecture should uniquely define which Tool is used from pkgs/native_toolchain_c/lib/src/native_toolchain/xxx.dart.

Currently we get away with not specifying which compiler is passed in by pattern matching on the file name and output on stdout after invoking with --version or /help. This does not seem like a clean abstraction.

So I'm leaning towards specifying the clang-like compilers per compiler family so that the "recognizer" doesn't have to do guesswork file file names and --version or /help.

What should the API for MSVC be?

A. Pass the path to vcvars.bat - This is simply part of how the MSVC toolchain works, so make it explicit and let packages wrapping the MSVC compiler deal with it (e.g. package:native_toolchain_c).
B. Mandate embedders run vcvars.bat and populate the environment accordingly.
C. Mandate embedders write batch scripts around cl.exe, link.exe and lib.exe and pass those in.

Now, let's consider we write a package:cmake.

A. package:cmake will need to know about this environment batch file stuff. This is in line with that cmake invokers have to set up the msvc environment variables. It's a bit manual though.
B. The convenience version, CMake will work out of the box. However, any other process calls will see these msvc environment variables (consider package:toolchain_rust).
C. Another convenience version, I'm hoping that this doesn't break CMake though. Will it still correctly recognize a wrapped compiler? How smart is its "recognizer". And how smart are other recognizers in other build systems that might be wrapping MSVC? gn/ninja?

I believe C. might break other build systems.
I believe B. might leak too much info to other process calls. From an encapsulation point of view it's less nice.
I believe A. is the least convenient for helper package authors (N<10), but it's less likely to break anything.

All are somewhat reasonable options.

@mosuem @mkustermann Any preferences?

@dcharkes
Copy link
Collaborator

dcharkes commented Jan 14, 2025

From a discussion with @mkustermann:

  • What about clang with Windows? That doesn't fit in the above design. We need to pass in a path to the Windows system headers and libraries to link against.
  • If we don't want to run any "recognizer" we also need to pass in a version. Otherwise we'll still need to run --version or /help on the passed in compiler.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

No branches or pull requests

2 participants