Revert "cgo: use O3"

This reverts commit bea1f1fac6b6b51bb3b8a666789c518b7aaa8b94.
This commit is contained in:
Michael Yang 2025-01-30 13:06:48 -08:00
parent 3f0cb36bdb
commit 548a9f56a6
11 changed files with 1 additions and 13 deletions

View File

@ -3,7 +3,6 @@
package discover
/*
#cgo CPPFLAGS: -O3
#cgo linux LDFLAGS: -lrt -lpthread -ldl -lstdc++ -lm
#cgo windows LDFLAGS: -lpthread

View File

@ -4,7 +4,6 @@ package discover
/*
#cgo CFLAGS: -x objective-c
#cgo CPPFLAGS: -O3
#cgo LDFLAGS: -framework Foundation -framework CoreGraphics -framework Metal
#include "gpu_info_darwin.h"
*/

View File

@ -1,7 +1,6 @@
package llava
// #cgo CXXFLAGS: -std=c++11
// #cgo CPPFLAGS: -O3
// #cgo CPPFLAGS: -I${SRCDIR}/../../include -I${SRCDIR}/../../common
// #cgo CPPFLAGS: -I${SRCDIR}/../../../../ml/backend/ggml/ggml/include
import "C"

View File

@ -1,7 +1,6 @@
package llama
// #cgo CXXFLAGS: -std=c++17
// #cgo CPPFLAGS: -O3
// #cgo CPPFLAGS: -I${SRCDIR}/../include
// #cgo CPPFLAGS: -I${SRCDIR}/../../../ml/backend/ggml/ggml/include
// #cgo windows CPPFLAGS: -D_WIN32_WINNT=0x0602

View File

@ -3,7 +3,6 @@ package llama
/*
#cgo CFLAGS: -std=c11
#cgo CXXFLAGS: -std=c++17
#cgo CPPFLAGS: -O3
#cgo CPPFLAGS: -I${SRCDIR}/llama.cpp/include
#cgo CPPFLAGS: -I${SRCDIR}/llama.cpp/common
#cgo CPPFLAGS: -I${SRCDIR}/llama.cpp/examples/llava

View File

@ -3,7 +3,6 @@
package blas
// #cgo CXXFLAGS: -std=c++11
// #cgo CPPFLAGS: -O3
// #cgo CPPFLAGS: -DGGML_USE_BLAS
// #cgo CPPFLAGS: -I${SRCDIR}/.. -I${SRCDIR}/../../include
// #cgo darwin,arm64 CPPFLAGS: -DGGML_BLAS_USE_ACCELERATE -DACCELERATE_NEW_LAPACK -DACCELERATE_LAPACK_ILP64

View File

@ -2,11 +2,9 @@ package cpu
// #cgo CFLAGS: -Wno-implicit-function-declaration
// #cgo CXXFLAGS: -std=c++17
// #cgo CPPFLAGS: -O3
// #cgo CPPFLAGS: -DGGML_USE_LLAMAFILE
// #cgo CPPFLAGS: -I${SRCDIR}/amx -I${SRCDIR}/llamafile -I${SRCDIR}/.. -I${SRCDIR}/../../include
// #cgo CPPFLAGS: -DGGML_USE_LLAMAFILE
// #cgo linux CPPFLAGS: -D_GNU_SOURCE
// #cgo arm64 CPPFLAGS: -DGGML_USE_AARCH64
// #cgo darwin,arm64 CPPFLAGS: -DGGML_USE_ACCELERATE -DACCELERATE_NEW_LAPACK -DACCELERATE_LAPACK_ILP64
// #cgo darwin,arm64 LDFLAGS: -framework Accelerate
import "C"

View File

@ -1,6 +1,5 @@
package llamafile
// #cgo CXXFLAGS: -std=c++17
// #cgo CPPFLAGS: -O3
// #cgo CPPFLAGS: -I${SRCDIR}/.. -I${SRCDIR}/../.. -I${SRCDIR}/../../../include
import "C"

View File

@ -4,7 +4,6 @@ package metal
//go:generate sh -c "{ echo // Code generated $(date). DO NOT EDIT.; sed -e '/__embed_ggml-common.h__/r ../ggml-common.h' -e '/__embed_ggml-common.h__/d' -e '/#include \"ggml-metal-impl.h\"/r ggml-metal-impl.h' -e '/#include \"ggml-metal-impl.h\"/d' ggml-metal.metal; } >ggml-metal-embed.metal"
// #cgo CPPFLAGS: -O3
// #cgo CPPFLAGS: -DGGML_METAL_EMBED_LIBRARY -I.. -I../../include
// #cgo LDFLAGS: -framework Metal -framework MetalKit
import "C"

View File

@ -1,7 +1,6 @@
package ggml
// #cgo CXXFLAGS: -std=c++17
// #cgo CPPFLAGS: -O3
// #cgo CPPFLAGS: -DNDEBUG -DGGML_USE_CPU
// #cgo CPPFLAGS: -I${SRCDIR}/../include -I${SRCDIR}/ggml-cpu
// #cgo windows LDFLAGS: -lmsvcrt -static -static-libgcc -static-libstdc++

View File

@ -1,6 +1,5 @@
package ggml
// #cgo CPPFLAGS: -O3
// #cgo CPPFLAGS: -DGGML_USE_METAL -DGGML_USE_BLAS
// #cgo LDFLAGS: -framework Foundation
import "C"