forked from bazelbuild/bazel
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This cl adds Skylark constants allowing users to specify which C++ action they want for the feature configuration Skylark API. This is done by exposing a Skylark file at @bazel_tools//tools/cpp:action_names.bzl. Skylark api to the C++ toolchain doc: https://docs.google.com/document/d/1g91BWJITcYw_X-VxsDC0VgUn5E9g0kRBGoBSpoO41gA/edit#. Progress on bazelbuild#4571. RELNOTES: None. PiperOrigin-RevId: 199596778
- Loading branch information
Showing
16 changed files
with
245 additions
and
172 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
75 changes: 75 additions & 0 deletions
75
src/main/java/com/google/devtools/build/lib/rules/cpp/CppActionNames.java
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,75 @@ | ||
// Copyright 2018 The Bazel 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. | ||
package com.google.devtools.build.lib.rules.cpp; | ||
|
||
/** Class holding constants for all C++ action names */ | ||
public class CppActionNames { | ||
|
||
/** A string constant used to compute CC_FLAGS make variable value */ | ||
public static final String CC_FLAGS_MAKE_VARIABLE = "cc-flags-make-variable"; | ||
/** A string constant for the strip action name. */ | ||
public static final String STRIP = "strip"; | ||
/** A string constant for the linkstamp-compile action. */ | ||
public static final String LINKSTAMP_COMPILE = "linkstamp-compile"; | ||
/** A string constant for the c compilation action. */ | ||
public static final String C_COMPILE = "c-compile"; | ||
/** A string constant for the c++ compilation action. */ | ||
public static final String CPP_COMPILE = "c++-compile"; | ||
/** A string constant for the c++ module compile action. */ | ||
public static final String CPP_MODULE_CODEGEN = "c++-module-codegen"; | ||
/** A string constant for the objc compilation action. */ | ||
public static final String OBJC_COMPILE = "objc-compile"; | ||
/** A string constant for the objc++ compile action. */ | ||
public static final String OBJCPP_COMPILE = "objc++-compile"; | ||
/** A string constant for the c++ header parsing. */ | ||
public static final String CPP_HEADER_PARSING = "c++-header-parsing"; | ||
/** A string constant for the c++ header preprocessing. */ | ||
public static final String CPP_HEADER_PREPROCESSING = "c++-header-preprocessing"; | ||
/** | ||
* A string constant for the c++ module compilation action. Note: currently we don't support C | ||
* module compilation. | ||
*/ | ||
public static final String CPP_MODULE_COMPILE = "c++-module-compile"; | ||
/** A string constant for the assembler actions. */ | ||
public static final String ASSEMBLE = "assemble"; | ||
|
||
public static final String PREPROCESS_ASSEMBLE = "preprocess-assemble"; | ||
/** | ||
* A string constant for the clif actions. Bazel enables different features of the toolchain based | ||
* on the name of the action. This name enables the clif_matcher feature, which switches the | ||
* "compiler" to the clif_matcher and adds some additional arguments as described in the CROSSTOOL | ||
* file. | ||
*/ | ||
public static final String CLIF_MATCH = "clif-match"; | ||
|
||
/** Name of the action producing static library. */ | ||
public static final String CPP_LINK_STATIC_LIBRARY = "c++-link-static-library"; | ||
/** Name of the action producing dynamic library from cc_library. */ | ||
public static final String CPP_LINK_NODEPS_DYNAMIC_LIBRARY = "c++-link-nodeps-dynamic-library"; | ||
/** Name of the action producing dynamic library from cc_binary. */ | ||
public static final String CPP_LINK_DYNAMIC_LIBRARY = "c++-link-dynamic-library"; | ||
/** Name of the action producing executable binary. */ | ||
public static final String CPP_LINK_EXECUTABLE = "c++-link-executable"; | ||
/** Name of the objc action producing static library */ | ||
public static final String OBJC_ARCHIVE = "objc-archive"; | ||
/** Name of the objc action producing dynamic library */ | ||
public static final String OBJC_FULLY_LINK = "objc-fully-link"; | ||
/** Name of the objc action producing objc executable binary */ | ||
public static final String OBJC_EXECUTABLE = "objc-executable"; | ||
/** Name of the objc action producing objc++ executable binary */ | ||
public static final String OBJCPP_EXECUTABLE = "objc++-executable"; | ||
|
||
public static final String LTO_INDEXING = "lto-indexing"; | ||
public static final String LTO_BACKEND = "lto-backend"; | ||
} |
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
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
Oops, something went wrong.