Look likes ldflags specified in BUILD.gn doesn't work.

40 views
Skip to first unread message

Samuel Yang

unread,
Oct 24, 2016, 10:32:49 PM10/24/16
to Chromium-dev

Dear all,

I have added a new target and have  add something like below in BUILD.gn. But looks like these ldflags are not set when linking the target.   Do you know how to add extra ldflags in my own target? thanks. 

ldflags = [
   "-Wl,--no-as-needed,-levent",
"-lm",
]



Thiago Farina

unread,
Oct 25, 2016, 1:56:25 PM10/25/16
to yangxi...@gmail.com, Chromium-dev
Did you rerun `gn gen`? What is the output of  `ninja -v`?



--
Thiago Farina

Samuel Yang

unread,
Oct 25, 2016, 9:34:23 PM10/25/16
to Chromium-dev, yangxi...@gmail.com

Yes, I have run gn gen and no error. 

with ninja verbose option, I didn't see anything I added in the ldflags. 


在 2016年10月26日星期三 UTC+8上午1:56:25,Thiago Farina写道:

Brett Wilson

unread,
Oct 25, 2016, 9:43:34 PM10/25/16
to Samuel Yang, Chromium-dev
You still didn't say the details of what you're doing so I still can't help.

Brett

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev

Samuel Yang

unread,
Oct 27, 2016, 5:19:06 AM10/27/16
to Chromium-dev, yangxi...@gmail.com
 
Sorry for that.

After looking into the GN document, I found that this may be the cause. I was building static target but not shared_library or component. 



在 2016年10月26日星期三 UTC+8上午9:43:34,Brett Wilson写道:
Reply all
Reply to author
Forward
0 new messages