forked from ebitengine/purego
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Eliott Bouhana <eliott.bouhana@datadoghq.com>
- Loading branch information
1 parent
e516d65
commit b19a2ee
Showing
1 changed file
with
19 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// SPDX-FileCopyrightText: 2022 The Ebitengine Authors | ||
|
||
//go:build !cgo || amd64 || arm64 | ||
|
||
package purego | ||
|
||
// if there is no Cgo we must link to each of the functions from dlfcn.h | ||
// then the functions are called inside dlfcn_stubs.s | ||
|
||
//go:cgo_import_dynamic purego_dlopen dlopen "libdl.so.2" | ||
//go:cgo_import_dynamic purego_dlsym dlsym "libdl.so.2" | ||
//go:cgo_import_dynamic purego_dlerror dlerror "libdl.so.2" | ||
//go:cgo_import_dynamic purego_dlclose dlclose "libdl.so.2" | ||
|
||
// on amd64 we don't need the following line - on 386 we do... | ||
// anyway - with those lines the output is better (but doesn't matter) - without it on amd64 we get multiple DT_NEEDED with "libc.so.6" etc | ||
|
||
//go:cgo_import_dynamic _ _ "libdl.so.2" |