builder: refactor clang include headers

Set -resource-dir in a central place instead of passing the header path
around everywhere and adding it using the `-I` flag. I believe this is
closer to how Clang is intended to be used.

This change was inspired by my attempt to add a Nix flake file to
TinyGo.
This commit is contained in:
Ayke van Laethem
2023-10-13 16:12:34 +02:00
committed by Ron Evans
parent c2f1965e03
commit d801d0cd53
14 changed files with 116 additions and 148 deletions
+1 -1
View File
@@ -145,7 +145,7 @@ func compileGoFileForTesting(t *testing.T, filename string) llvm.Module {
defer machine.Dispose()
// Load entire program AST into memory.
lprogram, err := loader.Load(config, filename, config.ClangHeaders, types.Config{
lprogram, err := loader.Load(config, filename, types.Config{
Sizes: compiler.Sizes(machine),
})
if err != nil {