Currently, there is no method without using internals to get the native compiler or toolchain for a native binary. There are many use cases for this. The first is if you need to run a task that requires a tool from the toolchain. One of the biggest could be things like checking for a correct pattern in a disassembled function, or things like checking shared library dependencies to make sure things are correct. Both of these require access to tools that are part of the toolchain (dumpbin for windows, nm, read-elf and objdump) for windows.
The other use case is tooling. Being able to generate tooling for IDEs like VS Code and compile_command.json requires access to the toolchain and all of its arguments in order to provide that information to the IDE.
Currently, there is no method without using internals to get the native compiler or toolchain for a native binary. There are many use cases for this. The first is if you need to run a task that requires a tool from the toolchain. One of the biggest could be things like checking for a correct pattern in a disassembled function, or things like checking shared library dependencies to make sure things are correct. Both of these require access to tools that are part of the toolchain (dumpbin for windows, nm, read-elf and objdump) for windows.
The other use case is tooling. Being able to generate tooling for IDEs like VS Code and compile_command.json requires access to the toolchain and all of its arguments in order to provide that information to the IDE.