This was previously broken and we didn't know it. See #1169pull/1171/head
parent
038b15a7b2
commit
3fad3cbb81
8 changed files with 51 additions and 0 deletions
@ -0,0 +1,6 @@ |
||||
#pragma once |
||||
|
||||
int func1(); |
||||
int func2(); |
||||
int func3(); |
||||
int func4(); |
@ -0,0 +1,5 @@ |
||||
#include"extractor.h" |
||||
|
||||
int func4() { |
||||
return 4; |
||||
} |
@ -0,0 +1,5 @@ |
||||
EXPORTS |
||||
func1 |
||||
func2 |
||||
func3 |
||||
func4 |
@ -0,0 +1,10 @@ |
||||
project('extract all', 'c', 'cpp') |
||||
|
||||
a = static_library('a', 'one.c', 'two.c') |
||||
b = static_library('b', 'three.c', 'four.c') |
||||
c = shared_library('c', |
||||
objects : [a.extract_all_objects(), b.extract_all_objects()], |
||||
vs_module_defs : 'func1234.def') |
||||
|
||||
e = executable('proggie', 'prog.c', link_with : c) |
||||
test('extall', e) |
@ -0,0 +1,5 @@ |
||||
#include"extractor.h" |
||||
|
||||
int func1() { |
||||
return 1; |
||||
} |
@ -0,0 +1,10 @@ |
||||
#include"extractor.h" |
||||
#include<stdio.h> |
||||
|
||||
int main(int argc, char **argv) { |
||||
if((1+2+3+4) != (func1() + func2() + func3() + func4())) { |
||||
printf("Arithmetic is fail.\n"); |
||||
return 1; |
||||
} |
||||
return 0; |
||||
} |
@ -0,0 +1,5 @@ |
||||
#include"extractor.h" |
||||
|
||||
int func3() { |
||||
return 3; |
||||
} |
@ -0,0 +1,5 @@ |
||||
#include"extractor.h" |
||||
|
||||
int func2() { |
||||
return 2; |
||||
} |
Loading…
Reference in new issue