From 3564ccf6e40b40395ebb2d36aa5487e725e02828 Mon Sep 17 00:00:00 2001 From: Jonathan Kim Date: Sat, 28 Apr 2018 20:42:53 -0700 Subject: [PATCH] Use wrapped cxx_binary Summary: Introduce `yoga_cxx_binary` Reviewed By: grzmiel Differential Revision: D7809271 fbshipit-source-id: 1b66ce59a73e4a63b670f7d3bcadfbb6cbfbc220 --- benchmark/BUCK | 5 ++--- yoga_defs.bzl | 5 +++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/benchmark/BUCK b/benchmark/BUCK index e4ebc8fd..2b30af78 100644 --- a/benchmark/BUCK +++ b/benchmark/BUCK @@ -3,9 +3,9 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. -load("//:yoga_defs.bzl", "yoga_dep", "ANDROID", "APPLE") +load("//:yoga_defs.bzl", "yoga_cxx_binary", "yoga_dep") -cxx_binary( +yoga_cxx_binary( name = "benchmark", srcs = glob(["*.c"]), headers = subdir_glob([("", "*.h")]), @@ -18,7 +18,6 @@ cxx_binary( "-O3", "-std=c11", ], - platforms = (ANDROID, APPLE), visibility = ["PUBLIC"], deps = [ yoga_dep(":yoga"), diff --git a/yoga_defs.bzl b/yoga_defs.bzl index d1adb090..e4ec182d 100644 --- a/yoga_defs.bzl +++ b/yoga_defs.bzl @@ -69,6 +69,11 @@ def yoga_apple_test(*args, **kwargs): native.apple_test(*args, **kwargs) +def yoga_cxx_binary(*args, **kwargs): + kwargs.pop("platforms", None) + native.cxx_binary(*args, **kwargs) + + def yoga_cxx_library(*args, **kwargs): # Currently unused kwargs.pop("platforms", None)