Test Unix x86 with asan/ubsan in CI (#49)

This commit is contained in:
Ilija Tovilo 2023-09-26 08:57:55 +01:00 committed by GitHub
parent e97f195025
commit 9a8cbdf28c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 6 deletions

View File

@ -14,6 +14,8 @@ jobs:
runs-on: ubuntu-22.04
container:
image: ubuntu:22.04
env:
CFLAGS: '-fsanitize=address,undefined'
steps:
- uses: actions/checkout@v3
- name: apt
@ -33,6 +35,8 @@ jobs:
runs-on: ubuntu-22.04
container:
image: ubuntu:22.04
env:
CFLAGS: '-fsanitize=address,undefined'
steps:
- uses: actions/checkout@v3
- name: apt
@ -86,6 +90,8 @@ jobs:
MACOS_x86_64:
runs-on: macos-11
env:
CFLAGS: '-fsanitize=address,undefined'
steps:
- uses: actions/checkout@v3
- name: brew

View File

@ -10,32 +10,32 @@ EXAMPLES_BUILD_DIR = $(BUILD_DIR)/examples
CC = gcc
CXX = g++
BUILD_CC = gcc
CFLAGS = -Wall -Wextra -Wno-unused-parameter
override CFLAGS += -Wall -Wextra -Wno-unused-parameter
LDFLAGS = -lm -ldl
PHP = php
LLK = llk
#LLK = $(PHP) $(HOME)/php/llk/llk.php
ifeq (debug, $(BUILD))
CFLAGS += -O0 -g -DIR_DEBUG=1
override CFLAGS += -O0 -g -DIR_DEBUG=1
endif
ifeq (release, $(BUILD))
CFLAGS += -O2 -g
override CFLAGS += -O2 -g
endif
ifeq (x86_64, $(TARGET))
CFLAGS += -DIR_TARGET_X64
override CFLAGS += -DIR_TARGET_X64
DASM_ARCH = x86
DASM_FLAGS = -M -D X64=1
endif
ifeq (x86, $(TARGET))
CFLAGS += -m32 -DIR_TARGET_X86
override CFLAGS += -m32 -DIR_TARGET_X86
DASM_ARCH = x86
DASM_FLAGS = -M
endif
ifeq (aarch64, $(TARGET))
CC= aarch64-linux-gnu-gcc --sysroot=$(HOME)/php/ARM64
CFLAGS += -DIR_TARGET_AARCH64
override CFLAGS += -DIR_TARGET_AARCH64
DASM_ARCH = aarch64
DASM_FLAGS = -M
endif