esp: support CGo
Without this patch, the include directory isn't found and picolibc.h (used indirectly by stdint.h for example) can't be found. I would like to add tests for this but we currently don't run Xtensa tests. This should be possible however using https://github.com/espressif/qemu/wiki (see also: https://github.com/tinygo-org/tinygo/pull/2780).
Этот коммит содержится в:
родитель
ef3b3c0d6a
коммит
8fb93fbac4
1 изменённых файлов: 1 добавлений и 0 удалений
|
@ -287,6 +287,7 @@ func (c *Config) CFlags() []string {
|
|||
path, _ := c.LibcPath("picolibc")
|
||||
cflags = append(cflags,
|
||||
"--sysroot="+path,
|
||||
"-isystem", filepath.Join(path, "include"), // necessary for Xtensa
|
||||
"-isystem", filepath.Join(picolibcDir, "include"),
|
||||
"-isystem", filepath.Join(picolibcDir, "tinystdio"),
|
||||
)
|
||||
|
|
Загрузка…
Создание таблицы
Сослаться в новой задаче