-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add folly dependencies to shim (#79)
Summary: X-link: pytorch/executorch#3563 X-link: facebook/folly#2185 This needs more work, but this is a good start X-link: facebook/folly#2185 Pulled By: bigfootjon Pull Request resolved: #79 bigfootjon Differential Revision: D57006939
- Loading branch information
1 parent
5dc9099
commit 793bfd8
Showing
42 changed files
with
1,027 additions
and
8 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
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 |
---|---|---|
@@ -1,5 +1,57 @@ | ||
load("@prelude//toolchains:demo.bzl", "system_demo_toolchains") | ||
load("@prelude//toolchains:cxx.bzl", "system_cxx_toolchain") | ||
load("@prelude//toolchains:genrule.bzl", "system_genrule_toolchain") | ||
load("@prelude//toolchains:go.bzl", "system_go_toolchain") | ||
load("@prelude//toolchains:haskell.bzl", "system_haskell_toolchain") | ||
load("@prelude//toolchains:ocaml.bzl", "system_ocaml_toolchain") | ||
load("@prelude//toolchains:python.bzl", "system_python_bootstrap_toolchain", "system_python_toolchain") | ||
load("@prelude//toolchains:remote_test_execution.bzl", "remote_test_execution_toolchain") | ||
load("@prelude//toolchains:rust.bzl", "system_rust_toolchain") | ||
|
||
# All the default toolchains, suitable for a quick demo or early prototyping. | ||
# Most real projects should copy/paste the implementation to configure them. | ||
system_demo_toolchains() | ||
oncall("open_source") | ||
|
||
system_cxx_toolchain( | ||
name = "cxx", | ||
cxx_flags = ["-std=c++17"], | ||
visibility = ["PUBLIC"], | ||
) | ||
|
||
system_genrule_toolchain( | ||
name = "genrule", | ||
visibility = ["PUBLIC"], | ||
) | ||
|
||
system_go_toolchain( | ||
name = "go", | ||
visibility = ["PUBLIC"], | ||
) | ||
|
||
system_haskell_toolchain( | ||
name = "haskell", | ||
visibility = ["PUBLIC"], | ||
) | ||
|
||
system_ocaml_toolchain( | ||
name = "ocaml", | ||
visibility = ["PUBLIC"], | ||
) | ||
|
||
system_python_toolchain( | ||
name = "python", | ||
visibility = ["PUBLIC"], | ||
) | ||
|
||
system_python_bootstrap_toolchain( | ||
name = "python_bootstrap", | ||
visibility = ["PUBLIC"], | ||
) | ||
|
||
system_rust_toolchain( | ||
name = "rust", | ||
default_edition = "2021", | ||
visibility = ["PUBLIC"], | ||
) | ||
|
||
remote_test_execution_toolchain( | ||
name = "remote_test_execution", | ||
visibility = ["PUBLIC"], | ||
) |
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,17 @@ | ||
# Copyright (c) Meta Platforms, Inc. and affiliates. | ||
# | ||
# This source code is licensed under both the MIT license found in the | ||
# LICENSE-MIT file in the root directory of this source tree and the Apache | ||
# License, Version 2.0 found in the LICENSE-APACHE file in the root directory | ||
# of this source tree. | ||
|
||
def _builder(**_): | ||
pass | ||
|
||
def _buck_opts(**_): | ||
pass | ||
|
||
fbpkg = struct( | ||
builder = _builder, | ||
buck_opts = _buck_opts, | ||
) |
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,8 @@ | ||
AutoHeaders = struct( | ||
NONE = "none", | ||
# Uses a recursive glob to resolve all transitive headers under the given | ||
# directory. | ||
RECURSIVE_GLOB = "recursive_glob", | ||
# Infer headers from sources of the rule. | ||
SOURCES = "sources", | ||
) |
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,13 @@ | ||
# Copyright (c) Meta Platforms, Inc. and affiliates. | ||
# | ||
# This source code is licensed under both the MIT license found in the | ||
# LICENSE-MIT file in the root directory of this source tree and the Apache | ||
# License, Version 2.0 found in the LICENSE-APACHE file in the root directory | ||
# of this source tree. | ||
|
||
def _get_build_mode(): | ||
return "" | ||
|
||
config = struct( | ||
get_build_mode = _get_build_mode, | ||
) |
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,9 @@ | ||
# Copyright (c) Meta Platforms, Inc. and affiliates. | ||
# | ||
# This source code is licensed under both the MIT license found in the | ||
# LICENSE-MIT file in the root directory of this source tree and the Apache | ||
# License, Version 2.0 found in the LICENSE-APACHE file in the root directory | ||
# of this source tree. | ||
|
||
def cpp_benchmark(**_): | ||
pass |
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,10 @@ | ||
# Copyright (c) Meta Platforms, Inc. and affiliates. | ||
# | ||
# This source code is licensed under both the MIT license found in the | ||
# LICENSE-MIT file in the root directory of this source tree and the Apache | ||
# License, Version 2.0 found in the LICENSE-APACHE file in the root directory | ||
# of this source tree. | ||
|
||
load("//:shims.bzl", _cpp_binary = "cpp_binary") | ||
|
||
cpp_binary = _cpp_binary |
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,10 @@ | ||
# Copyright (c) Meta Platforms, Inc. and affiliates. | ||
# | ||
# This source code is licensed under both the MIT license found in the | ||
# LICENSE-MIT file in the root directory of this source tree and the Apache | ||
# License, Version 2.0 found in the LICENSE-APACHE file in the root directory | ||
# of this source tree. | ||
|
||
load("//:shims.bzl", _cpp_unittest = "cpp_unittest") | ||
|
||
cpp_unittest = _cpp_unittest |
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,9 @@ | ||
# Copyright (c) Meta Platforms, Inc. and affiliates. | ||
# | ||
# This source code is licensed under both the MIT license found in the | ||
# LICENSE-MIT file in the root directory of this source tree and the Apache | ||
# License, Version 2.0 found in the LICENSE-APACHE file in the root directory | ||
# of this source tree. | ||
|
||
def custom_rule(**_): | ||
pass |
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,11 @@ | ||
# Copyright (c) Meta Platforms, Inc. and affiliates. | ||
# | ||
# This source code is licensed under both the MIT license found in the | ||
# LICENSE-MIT file in the root directory of this source tree and the Apache | ||
# License, Version 2.0 found in the LICENSE-APACHE file in the root directory | ||
# of this source tree. | ||
|
||
load("//build_defs:python_library.bzl", "python_library") | ||
|
||
def cython_library(name, visibility = ["PUBLIC"], **_): | ||
python_library(name = name, visibility = visibility) |
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
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
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,10 @@ | ||
# Copyright (c) Meta Platforms, Inc. and affiliates. | ||
# | ||
# This source code is licensed under both the MIT license found in the | ||
# LICENSE-MIT file in the root directory of this source tree and the Apache | ||
# License, Version 2.0 found in the LICENSE-APACHE file in the root directory | ||
# of this source tree. | ||
|
||
prelude = native | ||
|
||
prebuilt_cpp_library = native.prebuilt_cxx_library |
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,12 @@ | ||
# Copyright (c) Meta Platforms, Inc. and affiliates. | ||
# | ||
# This source code is licensed under both the MIT license found in the | ||
# LICENSE-MIT file in the root directory of this source tree and the Apache | ||
# License, Version 2.0 found in the LICENSE-APACHE file in the root directory | ||
# of this source tree. | ||
|
||
def python_library(srcs = [], visibility = ["PUBLIC"], **kwargs): | ||
_unused = srcs # @unused | ||
|
||
# @lint-ignore BUCKLINT: avoid "Direct usage of native rules is not allowed." | ||
native.python_library(visibility = visibility, **kwargs) |
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,12 @@ | ||
# Copyright (c) Meta Platforms, Inc. and affiliates. | ||
# | ||
# This source code is licensed under both the MIT license found in the | ||
# LICENSE-MIT file in the root directory of this source tree and the Apache | ||
# License, Version 2.0 found in the LICENSE-APACHE file in the root directory | ||
# of this source tree. | ||
|
||
def python_unittest(srcs = [], **kwargs): | ||
_unused = srcs # @unused | ||
|
||
# @lint-ignore BUCKLINT: avoid "Direct usage of native rules is not allowed." | ||
native.python_test(**kwargs) |
Oops, something went wrong.