mirror of
https://github.com/danog/ir.git
synced 2024-12-11 16:59:46 +01:00
Test Unix x86 with asan/ubsan in CI (#49)
This commit is contained in:
parent
e97f195025
commit
9a8cbdf28c
6
.github/workflows/push.yml
vendored
6
.github/workflows/push.yml
vendored
@ -14,6 +14,8 @@ jobs:
|
|||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
container:
|
container:
|
||||||
image: ubuntu:22.04
|
image: ubuntu:22.04
|
||||||
|
env:
|
||||||
|
CFLAGS: '-fsanitize=address,undefined'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: apt
|
- name: apt
|
||||||
@ -33,6 +35,8 @@ jobs:
|
|||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
container:
|
container:
|
||||||
image: ubuntu:22.04
|
image: ubuntu:22.04
|
||||||
|
env:
|
||||||
|
CFLAGS: '-fsanitize=address,undefined'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: apt
|
- name: apt
|
||||||
@ -86,6 +90,8 @@ jobs:
|
|||||||
|
|
||||||
MACOS_x86_64:
|
MACOS_x86_64:
|
||||||
runs-on: macos-11
|
runs-on: macos-11
|
||||||
|
env:
|
||||||
|
CFLAGS: '-fsanitize=address,undefined'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: brew
|
- name: brew
|
||||||
|
12
Makefile
12
Makefile
@ -10,32 +10,32 @@ EXAMPLES_BUILD_DIR = $(BUILD_DIR)/examples
|
|||||||
CC = gcc
|
CC = gcc
|
||||||
CXX = g++
|
CXX = g++
|
||||||
BUILD_CC = gcc
|
BUILD_CC = gcc
|
||||||
CFLAGS = -Wall -Wextra -Wno-unused-parameter
|
override CFLAGS += -Wall -Wextra -Wno-unused-parameter
|
||||||
LDFLAGS = -lm -ldl
|
LDFLAGS = -lm -ldl
|
||||||
PHP = php
|
PHP = php
|
||||||
LLK = llk
|
LLK = llk
|
||||||
#LLK = $(PHP) $(HOME)/php/llk/llk.php
|
#LLK = $(PHP) $(HOME)/php/llk/llk.php
|
||||||
|
|
||||||
ifeq (debug, $(BUILD))
|
ifeq (debug, $(BUILD))
|
||||||
CFLAGS += -O0 -g -DIR_DEBUG=1
|
override CFLAGS += -O0 -g -DIR_DEBUG=1
|
||||||
endif
|
endif
|
||||||
ifeq (release, $(BUILD))
|
ifeq (release, $(BUILD))
|
||||||
CFLAGS += -O2 -g
|
override CFLAGS += -O2 -g
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq (x86_64, $(TARGET))
|
ifeq (x86_64, $(TARGET))
|
||||||
CFLAGS += -DIR_TARGET_X64
|
override CFLAGS += -DIR_TARGET_X64
|
||||||
DASM_ARCH = x86
|
DASM_ARCH = x86
|
||||||
DASM_FLAGS = -M -D X64=1
|
DASM_FLAGS = -M -D X64=1
|
||||||
endif
|
endif
|
||||||
ifeq (x86, $(TARGET))
|
ifeq (x86, $(TARGET))
|
||||||
CFLAGS += -m32 -DIR_TARGET_X86
|
override CFLAGS += -m32 -DIR_TARGET_X86
|
||||||
DASM_ARCH = x86
|
DASM_ARCH = x86
|
||||||
DASM_FLAGS = -M
|
DASM_FLAGS = -M
|
||||||
endif
|
endif
|
||||||
ifeq (aarch64, $(TARGET))
|
ifeq (aarch64, $(TARGET))
|
||||||
CC= aarch64-linux-gnu-gcc --sysroot=$(HOME)/php/ARM64
|
CC= aarch64-linux-gnu-gcc --sysroot=$(HOME)/php/ARM64
|
||||||
CFLAGS += -DIR_TARGET_AARCH64
|
override CFLAGS += -DIR_TARGET_AARCH64
|
||||||
DASM_ARCH = aarch64
|
DASM_ARCH = aarch64
|
||||||
DASM_FLAGS = -M
|
DASM_FLAGS = -M
|
||||||
endif
|
endif
|
||||||
|
Loading…
Reference in New Issue
Block a user