forked from joejulian/gio
5326ca5fbe
The Nix version of the macOS toolchain has difficulties compiling Objective-C modules; disable modules instead of figuring out why. It also doesn't include any frameworks automatically; add them explicitly. While here, move suppression of OpenGL deprecation to a GL-specific file. Signed-off-by: Elias Naur <mail@eliasnaur.com>
22 lines
443 B
Go
22 lines
443 B
Go
// SPDX-License-Identifier: Unlicense OR MIT
|
|
|
|
// Package cocoainit initializes support for multithreaded
|
|
// programs in Cocoa.
|
|
package cocoainit
|
|
|
|
/*
|
|
#cgo CFLAGS: -xobjective-c -fobjc-arc
|
|
#cgo LDFLAGS: -framework Foundation
|
|
#import <Foundation/Foundation.h>
|
|
|
|
static inline void activate_cocoa_multithreading() {
|
|
[[NSThread new] start];
|
|
}
|
|
#pragma GCC visibility push(hidden)
|
|
*/
|
|
import "C"
|
|
|
|
func init() {
|
|
C.activate_cocoa_multithreading()
|
|
}
|