mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-05 01:15:35 +00:00
app/internal: consolidate CFLAGS and move -Werror to #cgo directives
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
#cgo CFLAGS: -Werror
|
||||||
#cgo linux LDFLAGS: -lGLESv2 -ldl
|
#cgo linux LDFLAGS: -lGLESv2 -ldl
|
||||||
#cgo darwin,!ios CFLAGS: -DGL_SILENCE_DEPRECATION
|
#cgo darwin,!ios CFLAGS: -DGL_SILENCE_DEPRECATION
|
||||||
#cgo darwin,!ios LDFLAGS: -framework OpenGL
|
#cgo darwin,!ios LDFLAGS: -framework OpenGL
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
package log
|
package log
|
||||||
|
|
||||||
/*
|
/*
|
||||||
#cgo CFLAGS: -fmodules -fobjc-arc -x objective-c
|
#cgo CFLAGS: -Werror -fmodules -fobjc-arc -x objective-c
|
||||||
|
|
||||||
#include "log_ios.h"
|
#include "log_ios.h"
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -5,8 +5,6 @@
|
|||||||
package window
|
package window
|
||||||
|
|
||||||
/*
|
/*
|
||||||
#cgo CFLAGS: -fmodules -fobjc-arc -x objective-c
|
|
||||||
|
|
||||||
#include <CoreFoundation/CoreFoundation.h>
|
#include <CoreFoundation/CoreFoundation.h>
|
||||||
#include <OpenGLES/ES2/gl.h>
|
#include <OpenGLES/ES2/gl.h>
|
||||||
#include <OpenGLES/ES2/glext.h>
|
#include <OpenGLES/ES2/glext.h>
|
||||||
|
|||||||
@@ -9,8 +9,6 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
#cgo CFLAGS: -DGL_SILENCE_DEPRECATION -fmodules -fobjc-arc -x objective-c
|
|
||||||
|
|
||||||
#include <CoreFoundation/CoreFoundation.h>
|
#include <CoreFoundation/CoreFoundation.h>
|
||||||
#include <CoreGraphics/CoreGraphics.h>
|
#include <CoreGraphics/CoreGraphics.h>
|
||||||
#include <AppKit/AppKit.h>
|
#include <AppKit/AppKit.h>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
package window
|
package window
|
||||||
|
|
||||||
/*
|
/*
|
||||||
#cgo LDFLAGS: -landroid
|
#cgo LDFLAGS: -Werror -landroid
|
||||||
|
|
||||||
#include <android/native_window_jni.h>
|
#include <android/native_window_jni.h>
|
||||||
#include <android/configuration.h>
|
#include <android/configuration.h>
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ import (
|
|||||||
/*
|
/*
|
||||||
#cgo CFLAGS: -DGL_SILENCE_DEPRECATION -Werror -Wno-deprecated-declarations -fmodules -fobjc-arc -x objective-c
|
#cgo CFLAGS: -DGL_SILENCE_DEPRECATION -Werror -Wno-deprecated-declarations -fmodules -fobjc-arc -x objective-c
|
||||||
|
|
||||||
|
|
||||||
#include <AppKit/AppKit.h>
|
#include <AppKit/AppKit.h>
|
||||||
#include "os_macos.h"
|
#include "os_macos.h"
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -126,7 +126,6 @@ func compileAndroid(tmpDir string, tools *androidTools, bi *buildInfo) (err erro
|
|||||||
"GOARCH="+a,
|
"GOARCH="+a,
|
||||||
"CGO_ENABLED=1",
|
"CGO_ENABLED=1",
|
||||||
"CC="+clang,
|
"CC="+clang,
|
||||||
"CGO_CFLAGS=-Werror",
|
|
||||||
)
|
)
|
||||||
builds.Go(func() error {
|
builds.Go(func() error {
|
||||||
_, err := runCmd(cmd)
|
_, err := runCmd(cmd)
|
||||||
|
|||||||
@@ -483,7 +483,6 @@ func iosCompilerFor(target, arch string) (string, []string, error) {
|
|||||||
}
|
}
|
||||||
cflags := []string{
|
cflags := []string{
|
||||||
"-fembed-bitcode",
|
"-fembed-bitcode",
|
||||||
"-Werror",
|
|
||||||
"-arch", allArchs[arch].iosArch,
|
"-arch", allArchs[arch].iosArch,
|
||||||
"-isysroot", sdkPath,
|
"-isysroot", sdkPath,
|
||||||
"-m" + platformOS + "-version-min=" + minIOSVersion,
|
"-m" + platformOS + "-version-min=" + minIOSVersion,
|
||||||
|
|||||||
Reference in New Issue
Block a user