Skip to content

Commit

Permalink
Fix config.h naming conflict.
Browse files Browse the repository at this point in the history
Signed-off-by: fruffy <[email protected]>
  • Loading branch information
fruffy committed Feb 7, 2025
1 parent b8be777 commit aa5404a
Show file tree
Hide file tree
Showing 20 changed files with 20 additions and 111 deletions.
3 changes: 1 addition & 2 deletions backends/tofino/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,7 @@ else()
set (BFN_P4C_GIT_SHA $ENV{BFN_P4C_GIT_SHA})
endif()
endif()
set (ENV{P4C_VERSION} "${BFN_P4C_VERSION} (SHA: ${BFN_P4C_GIT_SHA})")
MESSAGE(STATUS "p4c-barefoot version: $ENV{P4C_VERSION}")
MESSAGE(STATUS "p4c-barefoot version: ${BFN_P4C_VERSION}")

# Generate the sha specific version file. It includes the GIT SHA.
# Because this version changes frequently, we include it separately from the normal version files.
Expand Down
2 changes: 1 addition & 1 deletion backends/tofino/bf-asm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ set (HAVE_JBAY 1)
set (BFASM_LIBS ${BFASM_LIBS} regs_jbay)

# Other configuration files that need to be generated
configure_file ("${BFASM_SOURCE_DIR}/cmake/config.h.in" "${BFASM_GEN_DIR}/config.h")
configure_file ("${BFASM_SOURCE_DIR}/cmake/config.h.cmake" "${CMAKE_CURRENT_BINARY_DIR}/config.h")

set_source_files_properties (${BFAS_GEN_SOURCES} ${BFASM_GEN_DIR}/lex-yaml.c
PROPERTIES GENERATED TRUE)
Expand Down
3 changes: 1 addition & 2 deletions backends/tofino/bf-asm/action_bus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@

#include "action_bus.h"

#include <config.h>

#include "backends/tofino/bf-asm/config.h"
#include "backends/tofino/bf-asm/stage.h"
#include "lib/hex.h"
#include "misc.h"
Expand Down
3 changes: 1 addition & 2 deletions backends/tofino/bf-asm/attached_table.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,10 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include <config.h>

#include <unordered_map>

#include "action_bus.h"
#include "backends/tofino/bf-asm/config.h"
#include "backends/tofino/bf-asm/stage.h"
#include "backends/tofino/bf-asm/tables.h"
#include "input_xbar.h"
Expand Down
76 changes: 0 additions & 76 deletions backends/tofino/bf-asm/cmake/Abseil.cmake

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
/* Define to 1 if you have the ucontext.h header */
#cmakedefine HAVE_UCONTEXT_H @HAVE_UCONTEXT_H@



/* Define to 1 if we include JBay */
#cmakedefine HAVE_JBAY @HAVE_JBAY@

Expand All @@ -19,7 +17,7 @@
#cmakedefine CONTEXT_SCHEMA_VERSION "@CONTEXT_SCHEMA_VERSION@"

/* define the version */
#define TFAS_VERSION "${BFN_P4C_VERSION}"
#cmakedefine TFAS_VERSION "@BFN_P4C_VERSION@"


#endif // __BFASM_CONFIG_H__
3 changes: 2 additions & 1 deletion backends/tofino/bf-asm/crash.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include <config.h>
#include <errno.h>

#include "backends/tofino/bf-asm/config.h"
#if HAVE_EXECINFO_H
#include <execinfo.h>
#endif
Expand Down
3 changes: 1 addition & 2 deletions backends/tofino/bf-asm/deparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@

#include "deparser.h"

#include <config.h>

#include "backends/tofino/bf-asm/config.h"
#include "backends/tofino/bf-asm/target.h"
#include "constants.h"
#include "lib/range.h"
Expand Down
3 changes: 1 addition & 2 deletions backends/tofino/bf-asm/hash_dist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@

#include "hash_dist.h"

#include <config.h>

#include "backends/tofino/bf-asm/config.h"
#include "backends/tofino/bf-asm/stage.h"
#include "lib/range.h"

Expand Down
2 changes: 1 addition & 1 deletion backends/tofino/bf-asm/input_xbar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@

#include "input_xbar.h"

#include <config.h>
#include <stdlib.h>

#include <fstream>

#include "backends/tofino/bf-asm/config.h"
#include "backends/tofino/bf-asm/stage.h"
#include "backends/tofino/bf-asm/tables.h"
#include "hashexpr.h"
Expand Down
3 changes: 1 addition & 2 deletions backends/tofino/bf-asm/instruction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@

#include "instruction.h"

#include <config.h>

#include "action_bus.h"
#include "backends/tofino/bf-asm/config.h"
#include "backends/tofino/bf-asm/stage.h"
#include "backends/tofino/bf-asm/tables.h"
#include "depositfield.h"
Expand Down
3 changes: 1 addition & 2 deletions backends/tofino/bf-asm/instruction.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@
#ifndef BACKENDS_TOFINO_BF_ASM_INSTRUCTION_H_
#define BACKENDS_TOFINO_BF_ASM_INSTRUCTION_H_

#include <config.h>

#include <functional>

#include "backends/tofino/bf-asm/config.h"
#include "backends/tofino/bf-asm/tables.h"

struct Instruction : public IHasDbPrint {
Expand Down
3 changes: 1 addition & 2 deletions backends/tofino/bf-asm/match_table.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,10 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include <config.h>

#include <unordered_map>

#include "action_bus.h"
#include "backends/tofino/bf-asm/config.h"
#include "backends/tofino/bf-asm/stage.h"
#include "backends/tofino/bf-asm/tables.h"
#include "input_xbar.h"
Expand Down
3 changes: 1 addition & 2 deletions backends/tofino/bf-asm/parser-tofino-jbay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@

#include "parser-tofino-jbay.h"

#include <config.h>

#include "backends/tofino/bf-asm/config.h"
#include "backends/tofino/bf-asm/stage.h"
#include "backends/tofino/bf-asm/target.h"
#include "constants.h"
Expand Down
3 changes: 1 addition & 2 deletions backends/tofino/bf-asm/salu_inst.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,11 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include <config.h>

#include <cstring>

#include <boost/optional.hpp>

#include "backends/tofino/bf-asm/config.h"
#include "backends/tofino/bf-asm/stage.h"
#include "backends/tofino/bf-asm/tables.h"
#include "instruction.h"
Expand Down
2 changes: 1 addition & 1 deletion backends/tofino/bf-asm/stage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@

#include "backends/tofino/bf-asm/stage.h"

#include <config.h>
#include <time.h>

#include <fstream>

#include "backends/tofino/bf-asm/config.h"
#include "backends/tofino/bf-asm/target.h"
#include "deparser.h"
#include "input_xbar.h"
Expand Down
3 changes: 1 addition & 2 deletions backends/tofino/bf-asm/tables.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,11 @@

#include "backends/tofino/bf-asm/tables.h"

#include <config.h>

#include <sstream>
#include <string>

#include "action_bus.h"
#include "backends/tofino/bf-asm/config.h"
#include "backends/tofino/bf-asm/stage.h"
#include "input_xbar.h"
#include "instruction.h"
Expand Down
3 changes: 1 addition & 2 deletions backends/tofino/bf-asm/tables.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
#ifndef BACKENDS_TOFINO_BF_ASM_TABLES_H_ // NOLINT(build/header_guard)
#define BACKENDS_TOFINO_BF_ASM_TABLES_H_

#include <config.h>

#include <iostream>
#include <set>
#include <string>
Expand All @@ -28,6 +26,7 @@

#include "alloc.h"
#include "asm-types.h"
#include "backends/tofino/bf-asm/config.h"
#include "backends/tofino/bf-asm/json.h"
#include "backends/tofino/bf-asm/target.h"
#include "constants.h"
Expand Down
3 changes: 1 addition & 2 deletions backends/tofino/bf-asm/target.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@

#include "backends/tofino/bf-asm/target.h"

#include <config.h>

#include "asm-types.h"
#include "backends/tofino/bf-asm/config.h"
#include "backends/tofino/bf-asm/tables.h"
#include "bson.h"
#include "parser.h"
Expand Down
3 changes: 1 addition & 2 deletions backends/tofino/bf-asm/target.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@
#ifndef TARGET_H_
#define TARGET_H_

#include <config.h>

#include "asm-types.h"
#include "backends/tofino/bf-asm/config.h"
#include "bfas.h"
#include "map.h"

Expand Down

0 comments on commit aa5404a

Please sign in to comment.