odin-lang / Odin

Odin Programming Language
https://odin-lang.org
BSD 3-Clause "New" or "Revised" License
6.97k stars 619 forks source link

Error while building on Windows (no_sanitize_address, unrecognized extended attribute) #3449

Open kr4ft3r opened 7 months ago

kr4ft3r commented 7 months ago

Context

Attempting to build on Windows with x64 Native Tools Command Prompt for VS 2017 fails. The instructions seem missleading as only the standard powershell succeeded, while VS 2017 command prompt fails complaining about unrecognized extended attribute no_sanitize_address.

Expected Behavior

Running x64 Native Tools Command Prompt for VS 2017 and build.bat from cloned repo should build without errors.

Current Behavior

Build fails:

D:\Work\Odin>build.bat
main.cpp
libtommath.cpp
d:\work\odin\src\gb\gb.h(3581): error C2485: 'no_sanitize_address': unrecognized extended attribute (compiling source file src\main.cpp)
laytan commented 6 months ago

https://github.com/odin-lang/Odin/blob/fd582015fe2bbaabc42f78caefec1bd95f4d1465/src/gb/gb.h#L482 Should be #if defined(_MSC_VER) && !defined(__clang__) I think