From 12efe604bb828c51f133022245a3bea13734f338 Mon Sep 17 00:00:00 2001 From: Emil Sjolander Date: Thu, 15 Dec 2016 06:31:47 -0800 Subject: [PATCH 01/11] Fix YogaKit tests on travis Summary: Fix include path Reviewed By: dshahidehpour Differential Revision: D4333185 fbshipit-source-id: 27638324e093260aa1b23134fab5140a0c703bc9 --- YogaKit/Tests/YogaKitTests.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/YogaKit/Tests/YogaKitTests.m b/YogaKit/Tests/YogaKitTests.m index 21b7f4ba..99927ade 100644 --- a/YogaKit/Tests/YogaKitTests.m +++ b/YogaKit/Tests/YogaKitTests.m @@ -9,7 +9,7 @@ #import -#import "UIView+Yoga.h" +#import @interface YogaKitTests : XCTestCase @end From cf753af247959592318522d76e1969022942f8c6 Mon Sep 17 00:00:00 2001 From: Jatin Pandey Date: Thu, 15 Dec 2016 06:47:55 -0800 Subject: [PATCH 02/11] Make documentation clearer Summary: Fixing a typo :) Closes https://github.com/facebook/yoga/pull/270 Reviewed By: dshahidehpour Differential Revision: D4333129 Pulled By: emilsjolander fbshipit-source-id: 28215de8fcd571fb889fe145ff303f231a50c598 --- YogaKit/UIView+Yoga.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/YogaKit/UIView+Yoga.h b/YogaKit/UIView+Yoga.h index 97bb2532..386416b2 100644 --- a/YogaKit/UIView+Yoga.h +++ b/YogaKit/UIView+Yoga.h @@ -55,7 +55,7 @@ - (YGDirection)yg_resolvedDirection; /** - Perform a layout calculation and update the frames of the views in the hierarchy with th results + Perform a layout calculation and update the frames of the views in the hierarchy with the results */ - (void)yg_applyLayout; From e85c5ce39d1eba1b2224fedf58eb5a819f7679c6 Mon Sep 17 00:00:00 2001 From: Kazuki Sakamoto Date: Thu, 15 Dec 2016 06:59:34 -0800 Subject: [PATCH 03/11] lowercase argument Summary: - Fix arguments of YogaNode.Create Reviewed By: emilsjolander Differential Revision: D4296488 fbshipit-source-id: f6eb5074b1b1462f2251d330929f7b8082ad72eb --- csharp/Facebook.Yoga/YogaNode.Create.cs | 36 +++++++++---------- .../tests/Facebook.Yoga/YogaNodeCreateTest.cs | 12 +++---- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/csharp/Facebook.Yoga/YogaNode.Create.cs b/csharp/Facebook.Yoga/YogaNode.Create.cs index a7df02d0..d04d0ffa 100644 --- a/csharp/Facebook.Yoga/YogaNode.Create.cs +++ b/csharp/Facebook.Yoga/YogaNode.Create.cs @@ -31,12 +31,12 @@ namespace Facebook.Yoga Spacing margin = null, Spacing padding = null, Spacing border = null, - float? Width = null, - float? Height = null, - float? MaxWidth = null, - float? MaxHeight = null, - float? MinWidth = null, - float? MinHeight = null) + float? width = null, + float? height = null, + float? maxWidth = null, + float? maxHeight = null, + float? minWidth = null, + float? minHeight = null) { YogaNode node = new YogaNode(); @@ -197,34 +197,34 @@ namespace Facebook.Yoga } } - if (Width.HasValue) + if (width.HasValue) { - node.Width = Width.Value; + node.Width = width.Value; } - if (Height.HasValue) + if (height.HasValue) { - node.Height = Height.Value; + node.Height = height.Value; } - if (MinWidth.HasValue) + if (minWidth.HasValue) { - node.MinWidth = MinWidth.Value; + node.MinWidth = minWidth.Value; } - if (MinHeight.HasValue) + if (minHeight.HasValue) { - node.MinHeight = MinHeight.Value; + node.MinHeight = minHeight.Value; } - if (MaxWidth.HasValue) + if (maxWidth.HasValue) { - node.MaxWidth = MaxWidth.Value; + node.MaxWidth = maxWidth.Value; } - if (MaxHeight.HasValue) + if (maxHeight.HasValue) { - node.MaxHeight = MaxHeight.Value; + node.MaxHeight = maxHeight.Value; } return node; diff --git a/csharp/tests/Facebook.Yoga/YogaNodeCreateTest.cs b/csharp/tests/Facebook.Yoga/YogaNodeCreateTest.cs index d7cd8d8e..0d43cdbc 100644 --- a/csharp/tests/Facebook.Yoga/YogaNodeCreateTest.cs +++ b/csharp/tests/Facebook.Yoga/YogaNodeCreateTest.cs @@ -87,12 +87,12 @@ namespace Facebook.Yoga padding: new Spacing(top: 13, bottom: 14, left: 15, right: 16), border: new Spacing(top: 17, bottom: 18, left: 19, right: 20), - Width: 21, - Height: 22, - MinWidth: 23, - MinHeight: 24, - MaxWidth: 25, - MaxHeight: 26); + width: 21, + height: 22, + minWidth: 23, + minHeight: 24, + maxWidth: 25, + maxHeight: 26); Assert.AreEqual(YogaDirection.RTL, node.StyleDirection); Assert.AreEqual(YogaFlexDirection.RowReverse, node.FlexDirection); From 642ea07d6f1155c733b0cf0cc796e1063770ed12 Mon Sep 17 00:00:00 2001 From: Kazuki Sakamoto Date: Thu, 15 Dec 2016 07:00:33 -0800 Subject: [PATCH 04/11] Update unmanaged dll name Summary: - Update unmanaged dll name from `Yoga.dll` to `yoga.dll` since Native.cs `DllName` referes lowercase `yoga` Reviewed By: emilsjolander Differential Revision: D4295954 fbshipit-source-id: 16b91c407506685b84902102cf4380cb149b5b2c --- csharp/Yoga/Yoga.vcxproj | 1 + 1 file changed, 1 insertion(+) diff --git a/csharp/Yoga/Yoga.vcxproj b/csharp/Yoga/Yoga.vcxproj index b3704474..7303d22d 100755 --- a/csharp/Yoga/Yoga.vcxproj +++ b/csharp/Yoga/Yoga.vcxproj @@ -21,6 +21,7 @@ {0446C86B-F47B-4C46-B673-C7AE0CFF35D5} Win32Proj + yoga Yoga 10.0.14393.0 From 88a4e44fd4ff77aa869846d78b1c4ca2387ccaa7 Mon Sep 17 00:00:00 2001 From: Emil Sjolander Date: Thu, 15 Dec 2016 08:49:51 -0800 Subject: [PATCH 05/11] Add YGNodeGetParent api Summary: Fixes https://github.com/facebook/css-layout/issues/248 Reviewed By: gkassabli Differential Revision: D4333456 fbshipit-source-id: 388afd0a01c19a6db73c175bf24c566278832cb9 --- yoga/Yoga.c | 4 ++++ yoga/Yoga.h | 1 + 2 files changed, 5 insertions(+) diff --git a/yoga/Yoga.c b/yoga/Yoga.c index 29acb459..6340d021 100644 --- a/yoga/Yoga.c +++ b/yoga/Yoga.c @@ -333,6 +333,10 @@ YGNodeRef YGNodeGetChild(const YGNodeRef node, const uint32_t index) { return YGNodeListGet(node->children, index); } +YGNodeRef YGNodeGetParent(const YGNodeRef node) { + return node->parent; +} + inline uint32_t YGNodeChildCount(const YGNodeRef node) { return YGNodeListCount(node->children); } diff --git a/yoga/Yoga.h b/yoga/Yoga.h index c7bc600d..79c59a4b 100644 --- a/yoga/Yoga.h +++ b/yoga/Yoga.h @@ -64,6 +64,7 @@ WIN_EXPORT void YGNodeInsertChild(const YGNodeRef node, const uint32_t index); WIN_EXPORT void YGNodeRemoveChild(const YGNodeRef node, const YGNodeRef child); WIN_EXPORT YGNodeRef YGNodeGetChild(const YGNodeRef node, const uint32_t index); +WIN_EXPORT YGNodeRef YGNodeGetParent(const YGNodeRef node); WIN_EXPORT uint32_t YGNodeChildCount(const YGNodeRef node); WIN_EXPORT void YGNodeCalculateLayout(const YGNodeRef node, From 25b206ac531f5946c20700bfbfb1d508ff8af11a Mon Sep 17 00:00:00 2001 From: Kazuki Sakamoto Date: Thu, 15 Dec 2016 12:44:19 -0800 Subject: [PATCH 06/11] Build native library with BUCK for .NET (Mono, Xamarin) Summary: Examples: - macOS on macOS (Mono, Xamarin.Mac, Unity) - `buck build //csharp:yoganet#shared,default` -> `libyoga.dylib` - Android (Xamarin.Android, Unity) - `buck build //csharp:yoganet#shared,android-armv7` -> `libyoga.so` - iOS (Xamarin.iOS, Unity) - `buck build //:yoga#static,iphoneos-arm64` -> `libyoga.a` - `buck build //csharp:yoganet#static,iphoneos-arm64` -> `libyoganet.a` Closes https://github.com/facebook/yoga/pull/282 Reviewed By: emilsjolander Differential Revision: D4333811 Pulled By: splhack fbshipit-source-id: 54f4364d93b2419d7504392eb558296a5d06772f --- BUCK | 8 -------- YOGA_DEFS | 8 ++++++++ csharp/BUCK | 15 +++++++++++++++ csharp/tests/Facebook.Yoga/test_macos.sh | 21 ++++++++------------- 4 files changed, 31 insertions(+), 21 deletions(-) diff --git a/BUCK b/BUCK index b9d6c907..aa7ec37e 100644 --- a/BUCK +++ b/BUCK @@ -7,14 +7,6 @@ include_defs('//YOGA_DEFS') -BASE_COMPILER_FLAGS = [ - '-fno-omit-frame-pointer', - '-fexceptions', - '-Wall', - '-Werror', - '-O3', -] - GMOCK_OVERRIDE_FLAGS = [ # gmock does not mark mocked methods as override, ignore the warnings in tests '-Wno-inconsistent-missing-override', diff --git a/YOGA_DEFS b/YOGA_DEFS index 137b96fd..288b13be 100644 --- a/YOGA_DEFS +++ b/YOGA_DEFS @@ -17,6 +17,14 @@ CXX_LIBRARY_WHITELIST = [ '//java:jni', ] +BASE_COMPILER_FLAGS = [ + '-fno-omit-frame-pointer', + '-fexceptions', + '-Wall', + '-Werror', + '-O3', +] + def yoga_dep(dep): return '//' + dep diff --git a/csharp/BUCK b/csharp/BUCK index 8223450a..7517c930 100644 --- a/csharp/BUCK +++ b/csharp/BUCK @@ -5,6 +5,10 @@ # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. +include_defs('//YOGA_DEFS') + +COMPILER_FLAGS = BASE_COMPILER_FLAGS + ['-std=c++11'] + csharp_library( name = 'yogalibnet46', dll_name = 'Facebook.Yoga.dll', @@ -18,3 +22,14 @@ csharp_library( framework_ver = 'net45', srcs = glob(['**/*.cs']), ) + +cxx_library( + name = 'yoganet', + soname = 'libyoga.$(ext)', + srcs = glob(['Yoga/YGInterop.cpp']), + compiler_flags = COMPILER_FLAGS, + link_style = 'static', + link_whole = True, + deps = [yoga_dep(':yoga')], + visibility = ['PUBLIC'], +) diff --git a/csharp/tests/Facebook.Yoga/test_macos.sh b/csharp/tests/Facebook.Yoga/test_macos.sh index 7df36893..1d04177d 100755 --- a/csharp/tests/Facebook.Yoga/test_macos.sh +++ b/csharp/tests/Facebook.Yoga/test_macos.sh @@ -1,16 +1,6 @@ #!/bin/sh -if clang --version >/dev/null 2>&1; then true; else - echo "ERROR: Can't execute clang. You need to install Xcode and command line tools." - exit 1 -fi - -if mcs --version >/dev/null 2>&1; then true; else - echo "ERROR: Can't execute mcs. You need to install Mono from http://www.mono-project.com/download/ and re-login to apply PATH environment." - exit 1 -fi - -if mono --version >/dev/null 2>&1; then true; else - echo "ERROR: Can't execute mono64. You need to install Mono from http://www.mono-project.com/download/ and re-login to apply PATH environment." +if mcs --version >/dev/null 2>&1 && mono --version >/dev/null 2>&1; then true; else + echo "ERROR: Need to install Mono (brew install mono, or http://www.mono-project.com/download/)" exit 1 fi @@ -28,6 +18,11 @@ if [ -d $NUNIT \ rm NUnit-2.6.4.zip fi -clang -g -Wall -Wextra -dynamiclib -o libyoga.dylib -I../../.. ../../../yoga/*.c ../../Yoga/YGInterop.cpp +TARGET=//csharp:yoganet#default,shared +buck build $TARGET +ROOT=`buck root|tail -1` +DYLIB=`buck targets --show-output $TARGET|tail -1|awk '{print $2}'` +cp $ROOT/$DYLIB . + mcs -debug -t:library -r:$NUNIT/nunit.framework.dll -out:YogaTest.dll *.cs ../../../csharp/Facebook.Yoga/*cs MONO_PATH=$NUNIT mono --arch=64 --debug $NUNIT/nunit-console.exe YogaTest.dll From 98bbc15435ef38d1a6a8308a32bff7bdf1b297c6 Mon Sep 17 00:00:00 2001 From: Kazuki Sakamoto Date: Fri, 16 Dec 2016 00:06:49 -0800 Subject: [PATCH 07/11] Support Xamarin.iOS Summary: - `__Internal` https://developer.xamarin.com/guides/ios/advanced_topics/native_interop/#Static_Libraries > Since you can only use static libraries on iOS, there is no external shared library to link with, so the path parameter in the DllImport attribute needs to use the special name __Internal (note the double underscore characters at the start of the name) as opposed to the path name. - `__IOS__` https://developer.xamarin.com/guides/cross-platform/application_fundamentals/building_cross_platform_applications/part_4_-_platform_divergence_abstraction_divergent_implementation/#iOS > Xamarin.iOS defines __IOS__ which you can use to detect iOS devices. Closes https://github.com/facebook/yoga/pull/277 Reviewed By: emilsjolander Differential Revision: D4338420 Pulled By: splhack fbshipit-source-id: 375efecbaf88fffbba544073c6d6b30fb1f4c8ba --- csharp/Facebook.Yoga/Native.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/csharp/Facebook.Yoga/Native.cs b/csharp/Facebook.Yoga/Native.cs index 7786b8cf..9b1eb03d 100644 --- a/csharp/Facebook.Yoga/Native.cs +++ b/csharp/Facebook.Yoga/Native.cs @@ -14,7 +14,7 @@ namespace Facebook.Yoga { internal static class Native { -#if UNITY_IOS && !UNITY_EDITOR +#if (UNITY_IOS && !UNITY_EDITOR) || __IOS__ private const string DllName = "__Internal"; #else private const string DllName = "yoga"; From 04fe81f88f67172dd277701ce71d6f3ceec2d41f Mon Sep 17 00:00:00 2001 From: Kazuki Sakamoto Date: Fri, 16 Dec 2016 00:06:50 -0800 Subject: [PATCH 08/11] YGNodeInit is no longer exported Summary: - Problem: Can't link yoga static libraries with Unity and Xamarin.iOS since YGNodeInit is undefined in the libraries. - Solution: Remove the reference in Native.cs Reviewed By: emilsjolander Differential Revision: D4338485 fbshipit-source-id: 9dc95aec8f1fd50f3f9d66e1623afe2fb1992210 --- csharp/Facebook.Yoga/Native.cs | 3 --- 1 file changed, 3 deletions(-) diff --git a/csharp/Facebook.Yoga/Native.cs b/csharp/Facebook.Yoga/Native.cs index 9b1eb03d..fc7df3ca 100644 --- a/csharp/Facebook.Yoga/Native.cs +++ b/csharp/Facebook.Yoga/Native.cs @@ -27,9 +27,6 @@ namespace Facebook.Yoga [DllImport(DllName)] public static extern IntPtr YGNodeNew(); - [DllImport(DllName)] - public static extern void YGNodeInit(IntPtr node); - [DllImport(DllName)] public static extern void YGNodeFree(IntPtr node); From 0296511f2c958b64a20cfdc32958a41136b68a18 Mon Sep 17 00:00:00 2001 From: Emil Sjolander Date: Fri, 16 Dec 2016 04:39:13 -0800 Subject: [PATCH 09/11] YGNodeChildCount -> YGNodeGetChildCount for consistency Summary: I kept wrongly typing this function which is a good sign that the name is inconsistent. Reviewed By: gkassabli Differential Revision: D4333480 fbshipit-source-id: 17058f18fa9e26b3e02f7a1651f7295cae59acad --- YogaKit/UIView+Yoga.m | 8 ++++---- csharp/Facebook.Yoga/Native.cs | 2 +- java/jni/YGJNI.cpp | 2 +- tests/YGLayoutDefaultValuesTest.cpp | 2 +- yoga/Yoga.c | 10 +++++----- yoga/Yoga.h | 2 +- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/YogaKit/UIView+Yoga.m b/YogaKit/UIView+Yoga.m index 0ad7bddc..241ad33e 100644 --- a/YogaKit/UIView+Yoga.m +++ b/YogaKit/UIView+Yoga.m @@ -53,7 +53,7 @@ - (NSUInteger)yg_numberOfChildren { - return YGNodeChildCount([self ygNode]); + return YGNodeGetChildCount([self ygNode]); } #pragma mark - Setters @@ -295,7 +295,7 @@ static void YGAttachNodesFromViewHierachy(UIView *view) { } BOOL shouldReconstructChildList = NO; - if (YGNodeChildCount(node) != subviewsToInclude.count) { + if (YGNodeGetChildCount(node) != subviewsToInclude.count) { shouldReconstructChildList = YES; } else { for (int i = 0; i < subviewsToInclude.count; i++) { @@ -324,8 +324,8 @@ static void YGRemoveAllChildren(const YGNodeRef node) return; } - while (YGNodeChildCount(node) > 0) { - YGNodeRemoveChild(node, YGNodeGetChild(node, YGNodeChildCount(node) - 1)); + while (YGNodeGetChildCount(node) > 0) { + YGNodeRemoveChild(node, YGNodeGetChild(node, YGNodeGetChildCount(node) - 1)); } } diff --git a/csharp/Facebook.Yoga/Native.cs b/csharp/Facebook.Yoga/Native.cs index fc7df3ca..57cc654f 100644 --- a/csharp/Facebook.Yoga/Native.cs +++ b/csharp/Facebook.Yoga/Native.cs @@ -55,7 +55,7 @@ namespace Facebook.Yoga public static extern IntPtr YGNodeGetChild(IntPtr node, uint index); [DllImport(DllName)] - public static extern uint YGNodeChildCount(IntPtr node); + public static extern uint YGNodeGetChildCount(IntPtr node); [DllImport(DllName)] public static extern void YGNodeCalculateLayout(IntPtr node, diff --git a/java/jni/YGJNI.cpp b/java/jni/YGJNI.cpp index bf17f087..09236b88 100644 --- a/java/jni/YGJNI.cpp +++ b/java/jni/YGJNI.cpp @@ -36,7 +36,7 @@ static void YGTransferLayoutOutputsRecursive(YGNodeRef root) { obj->setFieldValue(topField, YGNodeLayoutGetTop(root)); YGTransferLayoutDirection(root, obj); - for (uint32_t i = 0; i < YGNodeChildCount(root); i++) { + for (uint32_t i = 0; i < YGNodeGetChildCount(root); i++) { YGTransferLayoutOutputsRecursive(YGNodeGetChild(root, i)); } } else { diff --git a/tests/YGLayoutDefaultValuesTest.cpp b/tests/YGLayoutDefaultValuesTest.cpp index fbc1e1b9..044059b5 100644 --- a/tests/YGLayoutDefaultValuesTest.cpp +++ b/tests/YGLayoutDefaultValuesTest.cpp @@ -13,7 +13,7 @@ TEST(YogaTest, assert_default_values) { const YGNodeRef root = YGNodeNew(); - ASSERT_EQ(0, YGNodeChildCount(root)); + ASSERT_EQ(0, YGNodeGetChildCount(root)); ASSERT_EQ(NULL, YGNodeGetChild(root, 1)); ASSERT_EQ(YGDirectionInherit, YGNodeStyleGetDirection(root)); diff --git a/yoga/Yoga.c b/yoga/Yoga.c index 6340d021..dad81116 100644 --- a/yoga/Yoga.c +++ b/yoga/Yoga.c @@ -256,7 +256,7 @@ void YGNodeFree(const YGNodeRef node) { node->parent = NULL; } - const uint32_t childCount = YGNodeChildCount(node); + const uint32_t childCount = YGNodeGetChildCount(node); for (uint32_t i = 0; i < childCount; i++) { const YGNodeRef child = YGNodeGetChild(node, i); child->parent = NULL; @@ -268,7 +268,7 @@ void YGNodeFree(const YGNodeRef node) { } void YGNodeFreeRecursive(const YGNodeRef root) { - while (YGNodeChildCount(root) > 0) { + while (YGNodeGetChildCount(root) > 0) { const YGNodeRef child = YGNodeGetChild(root, 0); YGNodeRemoveChild(root, child); YGNodeFreeRecursive(child); @@ -277,7 +277,7 @@ void YGNodeFreeRecursive(const YGNodeRef root) { } void YGNodeReset(const YGNodeRef node) { - YG_ASSERT(YGNodeChildCount(node) == 0, "Cannot reset a node which still has children attached"); + YG_ASSERT(YGNodeGetChildCount(node) == 0, "Cannot reset a node which still has children attached"); YG_ASSERT(node->parent == NULL, "Cannot reset a node still attached to a parent"); YGNodeListFree(node->children); @@ -303,7 +303,7 @@ void YGNodeSetMeasureFunc(const YGNodeRef node, YGMeasureFunc measureFunc) { if (measureFunc == NULL) { node->measure = NULL; } else { - YG_ASSERT(YGNodeChildCount(node) == 0, + YG_ASSERT(YGNodeGetChildCount(node) == 0, "Cannot set measure function: Nodes with measure functions cannot have children."); node->measure = measureFunc; } @@ -337,7 +337,7 @@ YGNodeRef YGNodeGetParent(const YGNodeRef node) { return node->parent; } -inline uint32_t YGNodeChildCount(const YGNodeRef node) { +inline uint32_t YGNodeGetChildCount(const YGNodeRef node) { return YGNodeListCount(node->children); } diff --git a/yoga/Yoga.h b/yoga/Yoga.h index 79c59a4b..3bb96727 100644 --- a/yoga/Yoga.h +++ b/yoga/Yoga.h @@ -65,7 +65,7 @@ WIN_EXPORT void YGNodeInsertChild(const YGNodeRef node, WIN_EXPORT void YGNodeRemoveChild(const YGNodeRef node, const YGNodeRef child); WIN_EXPORT YGNodeRef YGNodeGetChild(const YGNodeRef node, const uint32_t index); WIN_EXPORT YGNodeRef YGNodeGetParent(const YGNodeRef node); -WIN_EXPORT uint32_t YGNodeChildCount(const YGNodeRef node); +WIN_EXPORT uint32_t YGNodeGetChildCount(const YGNodeRef node); WIN_EXPORT void YGNodeCalculateLayout(const YGNodeRef node, const float availableWidth, From ba0bb103669e2510bb6a2daf5393c2c4495644de Mon Sep 17 00:00:00 2001 From: Kazuki Sakamoto Date: Fri, 16 Dec 2016 06:53:47 -0800 Subject: [PATCH 10/11] Build iOS fat static library for Unity and Xamarin Summary: $ buck build //csharp:yoganet-ios $ buck targets --show-output //csharp:yoganet-ios //csharp:yoganet-ios buck-out/gen/csharp/yoganet-ios/libyoga.a $ lipo -info buck-out/gen/csharp/yoganet-ios/libyoga.a Architectures in the fat file: buck-out/gen/csharp/yoganet-ios/libyoga.a are: armv7 x86_64 arm64 $ nm buck-out/gen/csharp/yoganet-ios/libyoga.a|grep -e 'T _YGNodeNew' -e 'ygNode' -e 'T _YGInteropSetLogger' 0000000000000000 T _YGNodeNew 0000000000001070 t -[UIView(Yoga) ygNode] 0000000000000000 T _YGInteropSetLogger Closes https://github.com/facebook/yoga/pull/286 Reviewed By: emilsjolander Differential Revision: D4338919 Pulled By: splhack fbshipit-source-id: 7acfdfa0dc4d152d7bfe92161efdeb9f161f70e6 --- csharp/BUCK | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/csharp/BUCK b/csharp/BUCK index 7517c930..8fc408eb 100644 --- a/csharp/BUCK +++ b/csharp/BUCK @@ -33,3 +33,31 @@ cxx_library( deps = [yoga_dep(':yoga')], visibility = ['PUBLIC'], ) + +with allow_unsafe_import(): + import os + +if os.path.isdir('/Applications/Xcode.app'): + yoganet_ios_srcs = [] + for arch in ['iphonesimulator-x86_64', 'iphoneos-arm64', 'iphoneos-armv7']: + name = 'yoganet-' + arch + yoganet_ios_srcs.append(':' + name) + genrule( + name = name, + srcs = [ + yoga_dep(':yoga#%s,static' % arch), + yoga_dep('YogaKit:YogaKit#%s,static' % arch), + yoga_dep('csharp:yoganet#%s,static' % arch), + ], + out = 'libyoga-%s.a' % arch, + cmd = 'libtool -static -o $OUT $SRCS', + visibility = [yoga_dep('csharp:yoganet-ios')], + ) + + genrule( + name = 'yoganet-ios', + srcs = yoganet_ios_srcs, + out = 'libyoga.a', + cmd = 'lipo $SRCS -create -output $OUT', + visibility = ['PUBLIC'], + ) From 74fb205083256a607d6e39bf05d7b8e6bcb60471 Mon Sep 17 00:00:00 2001 From: Emil Sjolander Date: Fri, 16 Dec 2016 09:03:52 -0800 Subject: [PATCH 11/11] Rename test files to match other test file names Summary: Rename test files to match other test file names Differential Revision: D4335198 fbshipit-source-id: b8f38162c3094231476059eb1f54326d8ba84848 --- tests/{YGLayoutAspectRatioTest.cpp => YGAspectRatioTest.cpp} | 0 tests/{YGLayoutDefaultValuesTest.cpp => YGDefaultValuesTest.cpp} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename tests/{YGLayoutAspectRatioTest.cpp => YGAspectRatioTest.cpp} (100%) rename tests/{YGLayoutDefaultValuesTest.cpp => YGDefaultValuesTest.cpp} (100%) diff --git a/tests/YGLayoutAspectRatioTest.cpp b/tests/YGAspectRatioTest.cpp similarity index 100% rename from tests/YGLayoutAspectRatioTest.cpp rename to tests/YGAspectRatioTest.cpp diff --git a/tests/YGLayoutDefaultValuesTest.cpp b/tests/YGDefaultValuesTest.cpp similarity index 100% rename from tests/YGLayoutDefaultValuesTest.cpp rename to tests/YGDefaultValuesTest.cpp