Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions internal/cmd/profile-setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func profileSetupHandler(cmd *cobra.Command, args []string) {
// Fetch target architecture
fmt.Println()
fmt.Println("Please specify the target architecture for this profile. " +
`Possible values are "386" and "amd64".` + "\n" +
`Possible values are "386", "amd64", and "arm64".` + "\n" +
"Keep it empty to use your system architecture.")
fmt.Println()

Expand All @@ -68,7 +68,7 @@ func profileSetupHandler(cmd *cobra.Command, args []string) {
}

switch targetArch {
case "386", "amd64":
case "386", "amd64", "arm64":
default:
cRedBold.Printf("Architecture %s is not supported\n", targetArch)
os.Exit(1)
Expand Down
2 changes: 2 additions & 0 deletions internal/generator/cgo.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ func createCgoFlags(profile config.Profile, projectDir string) (string, error) {
if _, ok := mapCompiler["EXPORT_ARCH_ARGS"]; ok {
if profile.Arch == "amd64" {
mapCompiler["EXPORT_ARCH_ARGS"] = "-arch x86_64"
} else if profile.Arch == "arm64" {
mapCompiler["EXPORT_ARCH_ARGS"] = "-arch aarch64"
} else {
mapCompiler["EXPORT_ARCH_ARGS"] = "-arch i386"
}
Expand Down