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

gccgo: add support for -fgo-importcfg #38025

Closed
stapelberg opened this issue Mar 23, 2020 · 1 comment
Closed

gccgo: add support for -fgo-importcfg #38025

stapelberg opened this issue Mar 23, 2020 · 1 comment
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@stapelberg
Copy link
Contributor

cmd/compile and cmd/link got support for -importcfg in commits 4d6b08d and 4f2269e, respectively.

The go tool already has support for conditionally using -fgo-importcfg when running gccgo:

if b.gccSupportsFlag(args[:1], "-fgo-importcfg=/dev/null") {
if err := b.writeFile(objdir+"importcfg", importcfg); err != nil {
return "", nil, err
}
args = append(args, "-fgo-importcfg="+objdir+"importcfg")
} else {
root := objdir + "_importcfgroot_"
if err := buildImportcfgSymlinks(b, root, importcfg); err != nil {
return "", nil, err
}
args = append(args, "-I", root)
}

…but gccgo itself doesn’t implement the -fgo-importcfg flag yet.

Adding support will allow us to drop a special case in our build system.

Filing this issue for tracking the addition as per @ianlancetaylor

@gopherbot gopherbot added this to the Gccgo milestone Mar 23, 2020
@andybons andybons added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Mar 23, 2020
@ianlancetaylor
Copy link
Contributor

Fixed by https://go.dev/cl/506095.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

4 participants