Last active
September 9, 2021 01:14
-
-
Save jenatali/aecd7a5194a6eb3f1d4f9ced2b36c9cc to your computer and use it in GitHub Desktop.
Meson VS build repro
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
extern int static_lib_function(void); | |
int both_lib_function(void) | |
{ | |
return static_lib_function(); | |
} |
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
from shutil import copyfile | |
import sys | |
copyfile(sys.argv[0], sys.argv[1]) |
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
int generated_function(void) | |
{ | |
return 42; | |
} |
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
project('test', 'c') | |
generated_c = custom_target( | |
'generated.c', | |
input : files('generated_source.c', 'copyfile.py'), | |
output : 'generated.c', | |
command : ['python', '@INPUT1@', '@INPUT0@', '@OUTPUT@'], | |
) | |
static_lib = static_library( | |
'static_lib', | |
[files('static_lib_source.c'), generated_c], | |
) | |
both_lib = both_libraries( | |
'both_lib', | |
[files('both_lib_source.c')], | |
link_with : [static_lib], | |
install : true, | |
) |
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
extern int generated_function(void); | |
int static_lib_function(void) | |
{ | |
return generated_function(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment