Unverified Commit bd98643a authored by Connor Baker's avatar Connor Baker Committed by GitHub
Browse files

python3Packages.warp-lang: 1.9.1 -> 1.10.0 (#462195)

parents 269f3e15 a862be07
Loading
Loading
Loading
Loading
+0 −15
Original line number Diff line number Diff line
diff --git a/warp/build_dll.py b/warp/build_dll.py
index 2218ff13..3fcf5796 100644
--- a/warp/build_dll.py
+++ b/warp/build_dll.py
@@ -404,8 +404,8 @@ def build_dll_for_arch(args, dll_path, cpp_paths, cu_path, arch, libs: Optional[
         cuda_compiler = "clang++" if getattr(args, "clang_build_toolchain", False) else "nvcc"
         cpp_compiler = "clang++" if getattr(args, "clang_build_toolchain", False) else "g++"
 
-        cpp_includes = f' -I"{warp_home_path.parent}/external/llvm-project/out/install/{mode}-{arch}/include"'
-        cpp_includes += f' -I"{warp_home_path.parent}/_build/host-deps/llvm-project/release-{arch}/include"'
+        cpp_includes = ' -I"@LLVM_DEV@/include"'
+        cpp_includes += ' -I"@LIBCLANG_DEV@/include"'
         cuda_includes = f' -I"{cuda_home}/include"' if cu_path else ""
         includes = cpp_includes + cuda_includes
+0 −28
Original line number Diff line number Diff line
diff --git a/warp/build_dll.py b/warp/build_dll.py
index 11d2a898..33fb2a76 100644
--- a/warp/build_dll.py
+++ b/warp/build_dll.py
@@ -636,8 +636,8 @@ def build_dll_for_arch(args, dll_path, cpp_paths, cu_path, arch, libs: list[str]
 
     else:
         # Unix compilation
-        cuda_compiler = "clang++" if getattr(args, "clang_build_toolchain", False) else "nvcc"
-        cpp_compiler = "clang++" if getattr(args, "clang_build_toolchain", False) else "g++"
+        cuda_compiler = "@CLANG@" if getattr(args, "clang_build_toolchain", False) else "nvcc"
+        cpp_compiler = "@CLANG@" if getattr(args, "clang_build_toolchain", False) else "g++"
 
         cpp_includes = f' -I"{warp_home_path.parent}/external/llvm-project/out/install/{mode}-{arch}/include"'
         cpp_includes += f' -I"{warp_home_path.parent}/_build/host-deps/llvm-project/release-{arch}/include"'
@@ -687,9 +687,9 @@ def build_dll_for_arch(args, dll_path, cpp_paths, cu_path, arch, libs: list[str]
             else:
                 # Use Clang compiler
                 if mode == "debug":
-                    cuda_cmd = f'clang++ -Werror -Wuninitialized -Wno-unknown-cuda-version {" ".join(clang_opts)} -g -O0 -fPIC -fvisibility=hidden -D_DEBUG -D_ITERATOR_DEBUG_LEVEL=0 -DWP_ENABLE_CUDA=1 -I"{native_dir}" -D{mathdx_enabled} {libmathdx_includes} -o "{cu_out}" -c "{cu_path}"'
+                    cuda_cmd = f'@CLANG@ -Werror -Wuninitialized -Wno-unknown-cuda-version {" ".join(clang_opts)} -g -O0 -fPIC -fvisibility=hidden -D_DEBUG -D_ITERATOR_DEBUG_LEVEL=0 -DWP_ENABLE_CUDA=1 -I"{native_dir}" -D{mathdx_enabled} {libmathdx_includes} -o "{cu_out}" -c "{cu_path}"'
                 elif mode == "release":
-                    cuda_cmd = f'clang++ -Werror -Wuninitialized -Wno-unknown-cuda-version {" ".join(clang_opts)} -O3 -fPIC -fvisibility=hidden -DNDEBUG -DWP_ENABLE_CUDA=1 -I"{native_dir}" -D{mathdx_enabled} {libmathdx_includes} -o "{cu_out}" -c "{cu_path}"'
+                    cuda_cmd = f'@CLANG@ -Werror -Wuninitialized -Wno-unknown-cuda-version {" ".join(clang_opts)} -O3 -fPIC -fvisibility=hidden -DNDEBUG -DWP_ENABLE_CUDA=1 -I"{native_dir}" -D{mathdx_enabled} {libmathdx_includes} -o "{cu_out}" -c "{cu_path}"'
 
             with ScopedTimer("build_cuda", active=args.verbose):
                 run_cmd(cuda_cmd)
+0 −25
Original line number Diff line number Diff line
diff --git a/build_llvm.py b/build_llvm.py
index aee0a9f1..5e1c3557 100644
--- a/build_llvm.py
+++ b/build_llvm.py
@@ -171,7 +171,6 @@ def build_llvm_clang_from_source_for_arch(args, arch: str, llvm_source: str) ->
         "-D", "LLVM_INCLUDE_TESTS=FALSE",
         "-D", "LLVM_INCLUDE_TOOLS=TRUE",  # Needed by Clang
         "-D", "LLVM_INCLUDE_UTILS=FALSE",
-        "-D", f"CMAKE_CXX_FLAGS=-D_GLIBCXX_USE_CXX11_ABI=0 {abi_version}",  # The pre-C++11 ABI is still the default on the CentOS 7 toolchain
         "-D", f"CMAKE_INSTALL_PREFIX={install_path}",
         "-D", f"LLVM_HOST_TRIPLE={host_triple}",
         "-D", f"CMAKE_OSX_ARCHITECTURES={osx_architectures}",
diff --git a/warp/build_dll.py b/warp/build_dll.py
index 2218ff13..2354f69f 100644
--- a/warp/build_dll.py
+++ b/warp/build_dll.py
@@ -417,7 +417,7 @@ def build_dll_for_arch(args, dll_path, cpp_paths, cu_path, arch, libs: Optional[
             else:
                 version = ""
 
-        cpp_flags = f'-Werror -Wuninitialized {version} --std=c++17 -fno-rtti -D{cuda_enabled} -D{mathdx_enabled} -D{cuda_compat_enabled} -fPIC -fvisibility=hidden -D_GLIBCXX_USE_CXX11_ABI=0 -I"{native_dir}" {includes} '
+        cpp_flags = f'-Werror -Wuninitialized {version} --std=c++17 -fno-rtti -D{cuda_enabled} -D{mathdx_enabled} -D{cuda_compat_enabled} -fPIC -fvisibility=hidden -I"{native_dir}" {includes} '
 
         if mode == "debug":
             cpp_flags += "-O0 -g -D_DEBUG -DWP_ENABLE_DEBUG=1 -fkeep-inline-functions"
+0 −12
Original line number Diff line number Diff line
diff --git a/warp/build_dll.py b/warp/build_dll.py
index 2218ff13..53786017 100644
--- a/warp/build_dll.py
+++ b/warp/build_dll.py
@@ -441,6 +442,7 @@ def build_dll_for_arch(args, dll_path, cpp_paths, cu_path, arch, libs: Optional[
                 build_cmd = f'{cpp_compiler} {cpp_flags} -c "{cpp_path}" -o "{cpp_out}"'
                 run_cmd(build_cmd)
 
+        ld_inputs.append('-L"@LIBCXX_LIB@/lib" -lc++')
         if cu_path:
             cu_out = cu_path + ".o"
 
+0 −51
Original line number Diff line number Diff line
diff --git a/build_llvm.py b/build_llvm.py
index aee0a9f1..bf281f6d 100644
--- a/build_llvm.py
+++ b/build_llvm.py
@@ -402,16 +402,4 @@ def build_warp_clang_for_arch(args, lib_name: str, arch: str) -> None:
 
 def build_warp_clang(args, lib_name: str) -> None:
     """Build the CPU-only Warp library using Clang/LLVM."""
-
-    if sys.platform == "darwin":
-        # create a universal binary by combining x86-64 and AArch64 builds
-        build_warp_clang_for_arch(args, lib_name + "-x86_64", "x86_64")
-        build_warp_clang_for_arch(args, lib_name + "-aarch64", "aarch64")
-
-        dylib_path = os.path.join(build_path, f"bin/{lib_name}")
-        run_cmd(f"lipo -create -output {dylib_path} {dylib_path}-x86_64 {dylib_path}-aarch64")
-        os.remove(f"{dylib_path}-x86_64")
-        os.remove(f"{dylib_path}-aarch64")
-
-    else:
-        build_warp_clang_for_arch(args, lib_name, machine_architecture())
+    build_warp_clang_for_arch(args, lib_name, machine_architecture())
diff --git a/warp/build_dll.py b/warp/build_dll.py
index 2218ff13..c0d978ce 100644
--- a/warp/build_dll.py
+++ b/warp/build_dll.py
@@ -410,7 +410,7 @@ def build_dll_for_arch(args, dll_path, cpp_paths, cu_path, arch, libs: Optional[
         includes = cpp_includes + cuda_includes
 
         if sys.platform == "darwin":
-            version = f"--target={arch}-apple-macos11"
+            version = ""
         else:
             if cpp_compiler == "g++":
                 version = "-fabi-version=13"  # GCC 8.2+
@@ -491,14 +491,4 @@ def build_dll_for_arch(args, dll_path, cpp_paths, cu_path, arch, libs: Optional[
 
 
 def build_dll(args, dll_path, cpp_paths, cu_path, libs=None):
-    if sys.platform == "darwin":
-        # create a universal binary by combining x86-64 and AArch64 builds
-        build_dll_for_arch(args, dll_path + "-x86_64", cpp_paths, cu_path, "x86_64", libs)
-        build_dll_for_arch(args, dll_path + "-aarch64", cpp_paths, cu_path, "aarch64", libs)
-
-        run_cmd(f"lipo -create -output {dll_path} {dll_path}-x86_64 {dll_path}-aarch64")
-        os.remove(f"{dll_path}-x86_64")
-        os.remove(f"{dll_path}-aarch64")
-
-    else:
-        build_dll_for_arch(args, dll_path, cpp_paths, cu_path, machine_architecture(), libs)
+    build_dll_for_arch(args, dll_path, cpp_paths, cu_path, machine_architecture(), libs)
Loading