meta: use clang -x c++ instead of clang++ #449

Merged
sb10q merged 1 commits from no-clang++ into master 2024-07-09 04:43:23 +08:00
3 changed files with 4 additions and 3 deletions
Showing only changes of commit 76defac462 - Show all commits

View File

@ -12,7 +12,7 @@
llvm-tools-irrt = pkgs.runCommandNoCC "llvm-tools-irrt" {} llvm-tools-irrt = pkgs.runCommandNoCC "llvm-tools-irrt" {}
'' ''
mkdir -p $out/bin mkdir -p $out/bin
ln -s ${pkgs.llvmPackages_14.clang-unwrapped}/bin/clang++ $out/bin/clang++-irrt ln -s ${pkgs.llvmPackages_14.clang-unwrapped}/bin/clang $out/bin/clang-irrt
ln -s ${pkgs.llvmPackages_14.llvm.out}/bin/llvm-as $out/bin/llvm-as-irrt ln -s ${pkgs.llvmPackages_14.llvm.out}/bin/llvm-as $out/bin/llvm-as-irrt
''; '';
nac3artiq = pkgs.python3Packages.toPythonModule ( nac3artiq = pkgs.python3Packages.toPythonModule (

View File

@ -17,6 +17,7 @@ fn main() {
let flags: &[&str] = &[ let flags: &[&str] = &[
"--target=wasm32", "--target=wasm32",
FILE, FILE,
"-x", "c++",
"-fno-discard-value-names", "-fno-discard-value-names",
"-fno-exceptions", "-fno-exceptions",
"-fno-rtti", "-fno-rtti",
@ -37,7 +38,7 @@ fn main() {
let out_dir = env::var("OUT_DIR").unwrap(); let out_dir = env::var("OUT_DIR").unwrap();
let out_path = Path::new(&out_dir); let out_path = Path::new(&out_dir);
let output = Command::new("clang++-irrt") let output = Command::new("clang-irrt")
.args(flags) .args(flags)
.output() .output()
.map(|o| { .map(|o| {

View File

@ -80,7 +80,7 @@ in rec {
llvm-tools-irrt = pkgs.runCommandNoCC "llvm-tools-irrt" {} llvm-tools-irrt = pkgs.runCommandNoCC "llvm-tools-irrt" {}
'' ''
mkdir -p $out/bin mkdir -p $out/bin
ln -s ${llvm-nac3}/bin/clang++.exe $out/bin/clang++-irrt.exe ln -s ${llvm-nac3}/bin/clang.exe $out/bin/clang-irrt.exe
ln -s ${llvm-nac3}/bin/llvm-as.exe $out/bin/llvm-as-irrt.exe ln -s ${llvm-nac3}/bin/llvm-as.exe $out/bin/llvm-as-irrt.exe
''; '';
nac3artiq = pkgs.rustPlatform.buildRustPackage { nac3artiq = pkgs.rustPlatform.buildRustPackage {