mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-08 13:03:39 +00:00
cgo: make -I and -L paths absolute
This is very useful for (conditionally) adding extra include paths relative to the package path.
This commit is contained in:
committed by
Ron Evans
parent
9cef23c318
commit
a8da601672
Vendored
+4
@@ -9,6 +9,9 @@ package main
|
||||
|
||||
#cgo CFLAGS: -DFOO
|
||||
|
||||
#cgo CFLAGS: -Iinclude
|
||||
#include "foo.h"
|
||||
|
||||
#if defined(FOO)
|
||||
#define BAR 3
|
||||
#else
|
||||
@@ -23,4 +26,5 @@ import "C"
|
||||
|
||||
var (
|
||||
_ = C.BAR
|
||||
_ = C.FOO_H
|
||||
)
|
||||
|
||||
Vendored
+1
@@ -9,6 +9,7 @@ import "unsafe"
|
||||
var _ unsafe.Pointer
|
||||
|
||||
const C.BAR = 3
|
||||
const C.FOO_H = 1
|
||||
|
||||
type C.int16_t = int16
|
||||
type C.int32_t = int32
|
||||
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
#define FOO_H 1
|
||||
Reference in New Issue
Block a user