@VMODULE relative paths in #flag lines

This commit is contained in:
Delyan Angelov 2020-02-06 18:38:35 +02:00 committed by GitHub
parent 67a13fc916
commit 2ce6b190dd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 42 additions and 0 deletions

View file

@ -0,0 +1,6 @@
#ifndef ADD_H
#define ADD_H
int cadd(int a, int b);
#endif

View file

@ -0,0 +1,5 @@
#include "header.h"
int cadd(int a, int b) {
return a + b;
}

View file

@ -0,0 +1,12 @@
module mod1
#flag -I @VMODULE/c
#flag @VMODULE/c/implementation.o
#include "header.h"
fn C.cadd(int,int) int
pub fn vadd(a int, b int) int {
return 1000 + C.cadd(a,b)
}