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

Setting environment variables. #37

Open
eddiewebb opened this issue Oct 13, 2019 · 1 comment
Open

Setting environment variables. #37

eddiewebb opened this issue Oct 13, 2019 · 1 comment

Comments

@eddiewebb
Copy link

I'm sorry, there is likely something obvious im missing...

My project has to set CGO_LDFLAGS_ALLOW to handle a dependent library. I can find no way to set that at a per-project level in my project config outside of re-defining the entire builder system in my project settings..

MYProject.sublime-project:

{
	"folders":
	[
		{
			"path": "/Users/eddie/Development/studio-light"
		}
	],
	"settings":{
		"env": {
			"CGO_LDFLAGS_ALLOW":"-fconstant-cfstrings",
		},
		"CGO_LDFLAGS_ALLOW":"-fconstant-cfstrings",
		"golang":{
			"CGO_LDFLAGS_ALLOW":"-fconstant-cfstrings",
			"env": {
				"CGO_LDFLAGS_ALLOW":"-fconstant-cfstrings",
			},
		}
	},
	// This overrides go build completely, not what I want. Excluding cmd throws an error.
	"build_systems":[
		{		
			"name":"Go",
			"cmd":"go",
			"env": {
				"CGO_LDFLAGS_ALLOW":"-fconstant-cfstrings",
			}
		}
	]

}
@zepellin
Copy link

Very much agree that having ability to add custom environmental variables for build would be very useful without having to redefine build system.

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

No branches or pull requests

2 participants