-
Notifications
You must be signed in to change notification settings - Fork 134
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Note these can be changed if we decide on different names for them, we're just getting something out there that people can use in code today. b/374985165
- Loading branch information
1 parent
e3d899b
commit eba3c66
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Copyright 2024 The Cobalt Authors. All Rights Reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
import("//build/buildflag_header.gni") | ||
import("//cobalt/build/configs/cobalt.gni") | ||
import("//cobalt/build/configs/variables.gni") | ||
|
||
declare_args() { | ||
use_starboard = target_os != "android" | ||
use_starboard_media = is_cobalt | ||
use_evergreen = false | ||
} | ||
|
||
# To use these build flags from i.e. "foo.cc", add a dependency from the target | ||
# containing "foo.cc" on this target, then have "foo.cc" include | ||
# "starboard/build/starboard_buildflags.h". After that you can use i.e. | ||
# BUILDFLAG(USE_STARBOARD) in your code. | ||
buildflag_header("starboard_buildflags") { | ||
header = "starboard_buildflags.h" | ||
|
||
flags = [ | ||
"USE_STARBOARD=$use_starboard", | ||
"USE_STARBOARD_MEDIA=$use_starboard_media", | ||
"USE_EVERGREEN=$use_evergreen", | ||
"IS_COBALT=$is_cobalt", | ||
"IS_MODULAR_BUILD=$sb_is_modular", | ||
] | ||
} |