Proposal: eliminate platform assertions from grit (e.g. is_win, is_android, etc)

Skip to first unread message

Newton Allen

Feb 26, 2014, 3:05:54 PM2/26/14
to, Jói Sigurðsson,
TL;DR: I am planning to remove platform assertions (e.g. is_win, is_android, etc) from grit. If you don't use platform assertions to conditionally include strings on certain platforms, this will not affect you. (As far as I can tell, platform assertions are only used in Chromium.) If you do use platform assertions, let me know, see the example below describing how your build scripts will need to change, and voice any concerns if you have them.

Background: Now that has landed, platform assertions can be replaced with simple variable defines, and we can remove the target platform (-t) flag from the build tool.

Example grd file:
... <if expr="is_android"> ... </if> ...
... <if expr="is_win"> ... </if> ...
... <if expr="is_posix"> ... </if> ...

# Specify the target platform with -t while building
grit -i example.grd build -t android ...

# Define variables is_android and is_posix using -D
grit -i example.grd build -D is_android -D is_posix ...

The main reason for removing platform assertions is that it decouples grit from the platforms that it's able to build on and removes a feature which is now mostly redundant with variable defines.

Reply all
Reply to author
0 new messages