blob: f3920419a530d6b0b86c4dcb0c89c125a0e41455 [file] [log] [blame]
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* 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.
*/
{namespace d_binary}
/***/
{template .soyweb}
{call buck.page}
{param title: 'd_binary()' /}
{param navid: 'rule_d_binary' /}
{param prettify: true /}
{param description}
A d_binary() rule builds a native D executable.
{/param}
{param content}
{call buck.rule}
{param status: 'UNFROZEN' /}
{param overview}
A d_binary() rule builds a native executable from the supplied set of D source
files and dependencies.
{/param}
{param args}
{call buck.name_arg /}
{call d_common.srcs_arg /}
{call d_common.deps_arg /}
{call d_common.linker_flags_arg /}
{/param} // close args
{param examples}
{literal}<pre class="prettyprint lang-py">
# A rule that builds a D native executable from a single .d file
# and a library dependency.
d_binary(
name='greet',
srcs=[
'greet.d',
],
deps=[
':greeting',
],
)
d_library(
name='greeting',
srcs=[
'greeting.d',
],
deps=[
':join',
],
)
d_library(
name='join',
srcs=[
'join.d',
],
)
</pre>{/literal}
{/param}
{/call} // close buck.rule
{/param}
{/call}
{/template}