Add Windows build with clang
This commit is contained in:
15
namecollision/build.ps1
Normal file
15
namecollision/build.ps1
Normal file
@@ -0,0 +1,15 @@
|
||||
param(
|
||||
[string]$Opt = "-O0"
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
# Compile hello.cpp as a shared library (also generates libhello.lib import library)
|
||||
clang++ -std=c++17 $Opt -shared -o libhello.dll hello.cpp "-Wl,/IMPLIB:libhello.lib"
|
||||
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
|
||||
|
||||
# Compile and link main.cpp with the shared library
|
||||
clang++ -std=c++17 $Opt -o main.exe main.cpp libhello.lib
|
||||
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
|
||||
|
||||
Write-Host "Build successful"
|
||||
Reference in New Issue
Block a user