History

tcc: Explicitly require -l<lib> for libraries

Previously it was possible to specify e.g. -q<lib> and still link with lib. Avoid such behaviour by checking for '-l' instead of '-l.'

Kirill Smelkov committed 16 years ago

Commit 93de8d81 parent 441a0891 file · +1 −1Browse files

Unified · Split

tcc.c+1−1
@@ -474,7 +474,7 @@ int main(int argc, char **argv) · 473 unmodified lines
474 const char *filename;474 const char *filename;
475 475
476 filename = files[i];476 filename = files[i];
477 if (filename[0] == '-' && filename[1]) {477 if (filename[0] == '-' && filename[1] == 'l') {
478 if (tcc_add_library(s, filename + 2) < 0) {478 if (tcc_add_library(s, filename + 2) < 0) {
479 error_noabort("cannot find %s", filename);479 error_noabort("cannot find %s", filename);
480 ret = 1;480 ret = 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