History

Revert "Win: Enable use "*.def + *.c" files as library instead of *.a by "-l" option"

This reverts commit 7a3f6d49415fd5f1fa99d25aba40c7884d5774a4.

Thomas Coudray committed 12 years ago

Commit 1fa0fe21 parent 7a3f6d41 file · +2 −9Browse files

Unified · Split

libtcc.c+2−9
@@ -1300,7 +1300,7 @@ ST_FUNC int tcc_add_crt(TCCState *s, const char *filename) · 1299 unmodified lines
1300LIBTCCAPI int tcc_add_library(TCCState *s, const char *libraryname)1300LIBTCCAPI int tcc_add_library(TCCState *s, const char *libraryname)
1301{1301{
1302#ifdef TCC_TARGET_PE1302#ifdef TCC_TARGET_PE
1303 const char *libs[] = { "%s/%s.def", "%s/lib%s.def", "%s/%s.dll", "%s/lib%s.dll", "%s/lib%s.a", "%s/%s.c", NULL };1303 const char *libs[] = { "%s/%s.def", "%s/lib%s.def", "%s/%s.dll", "%s/lib%s.dll", "%s/lib%s.a", NULL };
1304 const char **pp = s->static_link ? libs + 4 : libs;1304 const char **pp = s->static_link ? libs + 4 : libs;
1305#else1305#else
1306 const char *libs[] = { "%s/lib%s.so", "%s/lib%s.a", NULL };1306 const char *libs[] = { "%s/lib%s.so", "%s/lib%s.a", NULL };
@@ -1308,15 +1308,8 @@ LIBTCCAPI int tcc_add_library(TCCState *s, const char *libraryname) · 1 unmodified line
1308#endif1308#endif
1309 while (*pp) {1309 while (*pp) {
1310 if (0 == tcc_add_library_internal(s, *pp,1310 if (0 == tcc_add_library_internal(s, *pp,
1311 libraryname, 0, s->library_paths, s->nb_library_paths)) {1311 libraryname, 0, s->library_paths, s->nb_library_paths))
1312#ifdef TCC_TARGET_PE
1313 /* extra search for *.c file together with *.def file */
1314 if (pp < libs + 2)
1315 tcc_add_library_internal(s, *(libs + 5), libraryname, 0,
1316 s->library_paths, s->nb_library_paths);
1317#endif
1318 return 0;1312 return 0;
1319 }
1320 ++pp;1313 ++pp;
1321 }1314 }
1322 return -1;1315 return -1;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t