* yyscript.y (input_list_element): Allow strings prefixed with

the '-' character.  Treat these as libraries.
        * script.cc (script_add_library): New function.  Adds a library
        specified by "-l<name>" found in an input script.
        * script-c.h: Add prototype for script_add_library.
This commit is contained in:
Nick Clifton
2010-06-09 14:14:18 +00:00
parent f0b3dbfc47
commit e1df38aad4
4 changed files with 66 additions and 33 deletions

View File

@@ -320,6 +320,8 @@ input_list:
input_list_element:
string
{ script_add_file(closure, $1.value, $1.length); }
| '-' STRING
{ script_add_library(closure, $2.value, $2.length); }
| AS_NEEDED
{ script_start_as_needed(closure); }
'(' input_list ')'