diff --git a/internal/cmd/profile-setup.go b/internal/cmd/profile-setup.go index b136e27..abaf6dc 100644 --- a/internal/cmd/profile-setup.go +++ b/internal/cmd/profile-setup.go @@ -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() @@ -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) diff --git a/internal/generator/cgo.go b/internal/generator/cgo.go index 4b04368..28cf729 100644 --- a/internal/generator/cgo.go +++ b/internal/generator/cgo.go @@ -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" }