-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: Test extern'd globals on MacOS with the Apple Archiver
This is a regression test for: #11165. The test was initially merged as part of: #10628, but had to be reverted. A second attempt at fixing the root cause also had to be reverted: #10699. A 3rd attempt got merged but missed this unit test: #11742. Co-authored-by: Dylan Baker <[email protected]>
- Loading branch information
Showing
5 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// Source: https://lists.gnu.org/archive/html/libtool/2002-07/msg00025.html | ||
|
||
#include <stdio.h> | ||
|
||
extern int l2; | ||
void l1(void) | ||
{ | ||
printf("l1 %d\n", l2); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// Source: https://lists.gnu.org/archive/html/libtool/2002-07/msg00025.html | ||
|
||
int l2; | ||
void l2_func(void) | ||
{ | ||
l2 = 77; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Source: https://lists.gnu.org/archive/html/libtool/2002-07/msg00025.html | ||
|
||
project('global variable test', 'c') | ||
|
||
lib = static_library('mylib', 'libfile.c', 'libfile2.c') | ||
test('global variable', executable('prog', 'prog.c', link_with: lib)) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[binaries] | ||
ar = 'ar' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// Source: https://lists.gnu.org/archive/html/libtool/2002-07/msg00025.html | ||
|
||
extern void l1(void); | ||
int main(void) | ||
{ | ||
l1(); | ||
} |