accelerator/extension/AMBuilder
sappho 1d60f3746a
overhaul -> overhaul (#21)
* overhaul the repository

add protobuf

change repo url

try to restore github python syntax highlighter

move breakpad into third_party, update packagescript

* AMBuildifying

remove unnecessary files

Move the git patching into ambuild

move lss to a patch

Add windows compilation support

remove breakpad.bat

move postlink libs

* Overhaul CI (#4)

* Dockerbuild (#5)

* make cwd_cmd spew stdout and stderr

* add proper docker build support

* Overhaul ci (#6)

* Setup CI

* fix checkout

* fix yaml syntax

* no fail fast

* setup CI cache

* Fix pip install

* remove pip git

* update actions, ditch node 16

* small syntax cleanups

* more CI changes

* github doc lied

---------

Co-authored-by: Kenzzer <kenzzer@users.noreply.github.com>

* final push for perfect dockerbuilds in every scenario that i have been able to find

* rename cicd->dockerbuild

---------

Co-authored-by: Kenzzer <kenzzer@users.noreply.github.com>

* Add readme, remode duplicate -fPIC

update names of dockerbuild folder in sh files

* cleanup dockerfile (#7)

* Update 0002-Write-FUNC-records-instead-of-PUBLIC-for-ELF-symbols.patch

* Statically link libz, libgcc & libstdc++

* fix submodule path

* Review change + comment patch

---------

Co-authored-by: Kenzzer <kenzzer@users.noreply.github.com>
Co-authored-by: Benoist <14257866+Kenzzer@users.noreply.github.com>
2024-10-10 21:59:28 -04:00

58 lines
1.8 KiB
Python

# vim: set ts=2 sw=2 tw=99 noet ft=python:
import os, sys
builder.SetBuildFolder('/')
project = builder.LibraryProject('accelerator.ext')
project.sources = [
'extension.cpp',
'MemoryDownloader.cpp',
os.path.join(Accelerator.sm_root, 'public', 'smsdk_ext.cpp')
]
def AddSourceFilesFromDir(path, files):
list = []
for file in files:
list.append(os.path.join(path, file))
return list
for cxx in Accelerator.targets:
binary = Accelerator.ConfigureExtension(project, cxx, builder)
compiler = binary.compiler
# Wait for breakpad to be patched
compiler.sourcedeps += Accelerator.breakpad_patch
# We depend on breakpad on config
compiler.sourcedeps += Accelerator.breakpad_config[compiler.target.arch]
compiler.defines += ['HAVE_CONFIG_H']
compiler.cxxincludes += [
os.path.join(builder.sourcePath, 'third_party', 'breakpad', 'src'),
os.path.join(builder.buildPath, 'third_party', 'config', compiler.target.arch),
]
if compiler.target.platform in ['linux']:
binary.sources += AddSourceFilesFromDir(os.path.join(builder.currentSourcePath, '..', 'third_party', 'breakpad', 'src', 'common'), [
'dwarf_cfi_to_module.cc',
'dwarf_cu_to_module.cc',
'dwarf_line_to_module.cc',
'dwarf_range_list_handler.cc',
'language.cc',
'module.cc',
'path_helper.cc',
'stabs_reader.cc',
'stabs_to_module.cc',
'dwarf/bytereader.cc',
'dwarf/dwarf2diehandler.cc',
'dwarf/dwarf2reader.cc',
'dwarf/elf_reader.cc',
'linux/crc32.cc',
'linux/dump_symbols.cc',
'linux/elf_symbols_to_module.cc',
'linux/breakpad_getcontext.S'
])
Accelerator.link_libbreakpad_client(compiler, builder)
Accelerator.link_libbreakpad(compiler, builder)
Accelerator.link_libdisasm(compiler, builder)
Accelerator.extension = builder.Add(project)