Skip to content

Commit

Permalink
Update to peano latest
Browse files Browse the repository at this point in the history
Peano now includes startup code and links with libc by default,
so we no longer need to include these.
  • Loading branch information
stephenneuendorffer committed Jul 11, 2024
1 parent 76460fe commit 18b23bc
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 268 deletions.
112 changes: 0 additions & 112 deletions aie_runtime_lib/AIE/me_basic.c

This file was deleted.

Binary file removed aie_runtime_lib/AIE/me_basic.o
Binary file not shown.
107 changes: 0 additions & 107 deletions aie_runtime_lib/AIE2/me_basic.c

This file was deleted.

Binary file removed aie_runtime_lib/AIE2/me_basic.o
Binary file not shown.
20 changes: 0 additions & 20 deletions aie_runtime_lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,6 @@ add_custom_target(aie-runtime-libs ALL)

function(add_aie_runtime_libs arch)
add_custom_target(${arch}_me_basic ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/me_basic.o)
if(DEFINED VITIS_ROOT)
# Compile me_basic.o
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/me_basic.o
COMMAND ${VITIS_XCHESSCC} -p me -P ${VITIS_${arch}_INCLUDE_DIR}
-C Release
-I ${VITIS_${arch}_INCLUDE_DIR}/runtime/include/
-d -c ${CMAKE_CURRENT_SOURCE_DIR}/me_basic.c
-o ${CMAKE_CURRENT_BINARY_DIR}/me_basic.o
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/me_basic.c)
else()
# Exists in the source tree.. just copy it.
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/me_basic.o
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/me_basic.o
${CMAKE_CURRENT_BINARY_DIR}/me_basic.o
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/me_basic.o)
endif()
add_dependencies(aie-runtime-libs ${arch}_me_basic)

install(FILES ${CMAKE_CURRENT_BINARY_DIR}/me_basic.o DESTINATION ${CMAKE_INSTALL_PREFIX}/aie_runtime_lib/${arch})

# Precompile the intrinsic wrappers.
if(DEFINED VITIS_ROOT)
add_custom_target(${arch}_chess_intrinsic_wrapper ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/chess_intrinsic_wrapper.ll)
Expand Down
6 changes: 3 additions & 3 deletions lib/Targets/AIETargetLdScript.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ SECTIONS
{
. = 0x0;
.text : {
/* the _main_init symbol from me_basic.o has to come at address zero. */
*me_basic.o(.text)
/* the _main_init symbol has to come at address zero. */
*crt0.o(.text)
. = 0x200;
_ctors_start = .;
_init_array_start = .;
Expand Down Expand Up @@ -162,7 +162,7 @@ SECTIONS
if (auto fileAttr = coreOp.getLinkWith())
output << "INPUT(" << fileAttr.value().str() << ")\n";

output << "PROVIDE(_main = core_" << tile.getCol() << "_"
output << "PROVIDE(main = core_" << tile.getCol() << "_"
<< tile.getRow() << ");\n";
}
}
Expand Down
25 changes: 1 addition & 24 deletions python/compiler/aiecc/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -454,31 +454,8 @@ async def process_core(
runtime_lib_path = os.path.join(
install_path, "aie_runtime_lib", aie_target.upper()
)
clang_path = os.path.dirname(shutil.which("clang"))
# The build path for libc can be very different from where it's installed.
llvmlibc_build_lib_path = os.path.join(
clang_path,
"..",
"runtimes",
"runtimes-" + aie_target.lower() + "-none-unknown-elf-bins",
"libc",
"lib",
"libc.a",
)
llvmlibc_install_lib_path = os.path.join(
clang_path,
"..",
"lib",
aie_target.lower() + "-none-unknown-elf",
"libc.a",
)
me_basic_o = os.path.join(runtime_lib_path, "me_basic.o")
if os.path.isfile(llvmlibc_build_lib_path):
libc = llvmlibc_build_lib_path
else:
libc = llvmlibc_install_lib_path

clang_link_args = [me_basic_o, libc, "-Wl,--gc-sections"]
clang_link_args = ["-Wl,--gc-sections"]

if opts.progress:
task = self.progress_bar.add_task(
Expand Down
4 changes: 2 additions & 2 deletions test/generate-mmap/test_mmap0.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@
// LD44-NEXT: {
// LD44-NEXT: . = 0x0;
// LD44-NEXT: .text : {
// LD44-NEXT: /* the _main_init symbol from me_basic.o has to come at address zero. */
// LD44-NEXT: *me_basic.o(.text)
// LD44-NEXT: /* the _main_init symbol has to come at address zero. */
// LD44-NEXT: *crt0.o(.text)
// LD44-NEXT: . = 0x200;
// LD44-NEXT: _ctors_start = .;
// LD44-NEXT: _init_array_start = .;
Expand Down

0 comments on commit 18b23bc

Please sign in to comment.