Gn 学习

边学边用边记录

config: Defines a configuration object.

Configuration objects can be applied to targets and specify sets of compiler
flags, includes, defines
, etc. They provide a way to conveniently group sets
of this configuration information.

source: https://gn.googlesource.com/gn/+/master/docs/reference.md#func_config

在这里插入图片描述

deps: Private linked dependencies.

A list of target labels.
(依赖)
Specifies private dependencies of a target. Private dependencies are
propagated up the dependency tree and linked to dependent targets
, but do not
grant the ability to include headers from the dependency. Public configs are
not forwarded.

Data dependencies are propagated differently. See “gn help data_deps” and
“gn help runtime_deps”.

See also “public_deps”.

---- Poisons ----

The general idea is that some targets declare that they contain some
kind of poison, which makes it impossible for other targets to
depend on them (even transitively) unless they declare themselves
immune to that particular type of poison.

Targets that contain poison of type foo should contain the line

poisonous = [ “foo” ]

and targets that are immune but arent’t themselves poisonous
should contain

allow_poison = [ “foo” ]

webrtc自己定义的只有生明了才能编译,外国人真有趣

group 命名

默认会从当前目录下找模块,且下一个group名应该和目录名保持一直,或者用:来命名新的group

src 头文件

作为模块(在deps中声明)引入头文件的时候,只要在 sources =[ ] 中定义了 就可以直接用,并不需要再使用 include_dirs webrtc很多用的绝对目录

build/config/BUILDCONFIG.gn

里面存放了一些config的内容

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值