Enable undefined behavior sanitizer in CI
This commit is contained in:
		
							parent
							
								
									9c82038561
								
							
						
					
					
						commit
						61d57901b1
					
				| @ -42,6 +42,13 @@ build:asan: | |||||||
|   script: |   script: | ||||||
|     - nix build -L --no-link .#ovniPackages.asan |     - nix build -L --no-link .#ovniPackages.asan | ||||||
| 
 | 
 | ||||||
|  | build:ubsan: | ||||||
|  |   stage: build | ||||||
|  |   tags: | ||||||
|  |     - nix | ||||||
|  |   script: | ||||||
|  |     - nix build -L --no-link .#ovniPackages.ubsan | ||||||
|  | 
 | ||||||
| build:nompi: | build:nompi: | ||||||
|   stage: build |   stage: build | ||||||
|   tags: |   tags: | ||||||
|  | |||||||
| @ -67,7 +67,9 @@ set(CMAKE_C_FLAGS_ASAN "${CMAKE_C_FLAGS_DEBUG} \ | |||||||
|   -fno-omit-frame-pointer" |   -fno-omit-frame-pointer" | ||||||
|   CACHE STRING "Flags used by the C compiler during AddressSanitizer builds." FORCE) |   CACHE STRING "Flags used by the C compiler during AddressSanitizer builds." FORCE) | ||||||
| 
 | 
 | ||||||
| set(CMAKE_C_FLAGS_UBSAN "${CMAKE_C_FLAGS_DEBUG} -fsanitize=undefined" | set(CMAKE_C_FLAGS_UBSAN "${CMAKE_C_FLAGS_DEBUG} \ | ||||||
|  |   -fsanitize=undefined \ | ||||||
|  |   -fno-sanitize-recover=all" | ||||||
|   CACHE STRING "Flags used by the C compiler during UndefinedBehaviorSanitizer builds." FORCE) |   CACHE STRING "Flags used by the C compiler during UndefinedBehaviorSanitizer builds." FORCE) | ||||||
| 
 | 
 | ||||||
| find_program(IWYU NAMES include-what-you-use iwyu) | find_program(IWYU NAMES include-what-you-use iwyu) | ||||||
|  | |||||||
| @ -136,6 +136,11 @@ | |||||||
|         ''; |         ''; | ||||||
|       }); |       }); | ||||||
| 
 | 
 | ||||||
|  |       ubsan = rt.overrideAttrs (old: { | ||||||
|  |         pname = "ovni-ubsan"; | ||||||
|  |         cmakeFlags = old.cmakeFlags ++ [ "-DCMAKE_BUILD_TYPE=Ubsan" ]; | ||||||
|  |       }); | ||||||
|  | 
 | ||||||
|       armv7 = (pkgs.pkgsCross.armv7l-hf-multiplatform.ovniLocal.overrideAttrs (old: { |       armv7 = (pkgs.pkgsCross.armv7l-hf-multiplatform.ovniLocal.overrideAttrs (old: { | ||||||
|         pname = "ovni-armv7"; |         pname = "ovni-armv7"; | ||||||
|         buildInputs = []; |         buildInputs = []; | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user