mirror of
https://github.com/infiniteCable2/panda.git
synced 2026-02-19 09:43:51 +08:00
* mutation * clone * origin * get diff * better example * better * fix docker * work on push * make test fail * real change * test all modes * ignore * better * reco * fix * no libpanda on device * curl * nl * nl again * delete * clean * clean * this * add this back * cleanup
50 lines
979 B
Python
50 lines
979 B
Python
import os
|
|
import platform
|
|
|
|
COVERAGE_FLAGS = [
|
|
'-fprofile-instr-generate',
|
|
'-fcoverage-mapping',
|
|
]
|
|
|
|
env = Environment(
|
|
CC='clang',
|
|
CFLAGS=[
|
|
'-nostdlib',
|
|
'-fno-builtin',
|
|
'-std=gnu11',
|
|
'-Wfatal-errors',
|
|
'-Wno-pointer-to-int-cast',
|
|
],
|
|
CPPPATH=[".", "../../board/"],
|
|
)
|
|
if platform.system() == "Darwin":
|
|
env.PrependENVPath('PATH', '/opt/homebrew/bin')
|
|
|
|
TICI = os.path.isfile('/TICI')
|
|
AGNOS = TICI
|
|
if AGNOS:
|
|
env['CC'] = 'gcc'
|
|
else:
|
|
env['CFLAGS'] += COVERAGE_FLAGS
|
|
env['LINKFLAGS'] += COVERAGE_FLAGS
|
|
|
|
if GetOption('mutation'):
|
|
flags = [
|
|
'-fpass-plugin=/usr/lib/mull-ir-frontend-17',
|
|
'-g',
|
|
'-grecord-command-line',
|
|
]
|
|
env['CFLAGS'] += flags
|
|
env['LINKFLAGS'] += flags
|
|
|
|
if GetOption('ubsan'):
|
|
flags = [
|
|
"-fsanitize=undefined",
|
|
"-fno-sanitize-recover=undefined",
|
|
]
|
|
env['CFLAGS'] += flags
|
|
env['LINKFLAGS'] += flags
|
|
|
|
panda = env.SharedObject("panda.os", "panda.c")
|
|
libpanda = env.SharedLibrary("libpanda.so", [panda])
|