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

40 katselukertaa
Siirry ensimmäiseen lukemattomaan viestiin

Samuel Yang

lukematon,
24.10.2016 klo 22.32.4924.10.2016
vastaanottaja 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

lukematon,
25.10.2016 klo 13.56.2525.10.2016
vastaanottaja yangxi...@gmail.com, Chromium-dev
Did you rerun `gn gen`? What is the output of  `ninja -v`?



--
Thiago Farina

Samuel Yang

lukematon,
25.10.2016 klo 21.34.2325.10.2016
vastaanottaja 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

lukematon,
25.10.2016 klo 21.43.3425.10.2016
vastaanottaja 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

lukematon,
27.10.2016 klo 5.19.0627.10.2016
vastaanottaja 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写道:
Vastaa kaikille
Vastaa kirjoittajalle
Välitä
0 uutta viestiä