Skip to content

Commit

Permalink
Use 'nasm' not 'yasm' (#1630)
Browse files Browse the repository at this point in the history
### Issues:
Resolves aws/aws-lc-rs#425

### Context: 
* CMake will attempt to use [the YASM assembler if
found](https://github.com/Kitware/CMake/blob/cafa2986afb6eed3ba0318674c02e3a03ef34555/Modules/CMakeDetermineASM_NASMCompiler.cmake#L5).
* YASM is unable to handle our AVX-512 assembly:
```
...\aesni-xts-avx512.asm:136: error: undefined symbol `zmm25' (first use)
```

### Change:
* This change has CMake locate the "nasm" executable, then sets that as
the `CMAKE_ASM_NASM_COMPILER`.

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license and the ISC license.
  • Loading branch information
justsmth authored Jun 10, 2024
1 parent f304a81 commit 4e54dd8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crypto/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ if(NOT OPENSSL_NO_ASM)
set(PERLASM_STYLE win32n)
set(PERLASM_FLAGS "-DOPENSSL_IA32_SSE2")
endif()
find_program(NASM_EXECUTABLE nasm)
set(CMAKE_ASM_NASM_COMPILER ${NASM_EXECUTABLE})
set(CMAKE_ASM_NASM_FLAGS "${CMAKE_ASM_NASM_FLAGS} -gcv8")

# On Windows, we use the NASM output.
Expand Down

0 comments on commit 4e54dd8

Please sign in to comment.