8000 attempt to make project build on windows with clang by solomoncyj · Pull Request #1745 · uxlfoundation/oneTBB · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

attempt to make project build on windows with clang #1745

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

solomoncyj
Copy link
@solomoncyj solomoncyj commented Jun 2, 2025

Description

prevents the flags -fPIC, -fstack-clash-protection from crashing the build and add -Wno-error=deprecated as it will raise a warning that crashes the build due to -Werror otherwise

Fixes #1741

Type of change

  • [*] bug fix - change that fixes an issue
  • new feature - change that adds functionality
  • tests - change in tests
  • infrastructure - change in infrastructure and CI
  • documentation - documentation update

Tests

  • added - required for new features and some bug fixes
  • [*] not needed

Documentation

  • updated in # - add PR number
  • needs to be updated
  • [*] not needed

Breaks backward compatibility

  • Yes
  • [*] No
  • Unknown

Notify the following users

List users with @ to send notifications

Other information

linking still fialis halfway with:

FAILED: clang_20.1_cxx11_64_release/tbbmalloc.dll clang_20.1_cxx11_64_release/tbbmalloc.lib
C:\WINDOWS\system32\cmd.exe /C "cd . && C:\PROGRA~1\LLVM\bin\clang.exe -nostartfiles -nostdlib -O3 -DNDEBUG -D_DLL -D_MT -Xclang --dependent-lib=msvcrt -flto=thin  -Wl,--version-script="C:/Users/solom/Downloads/oneTBB/src/tbbmalloc/def/lin64-tbbmalloc.def"  -Wl,-z,relro,-z,now,-z,noexecstack -fuse-ld=lld-link -shared -o clang_20.1_cxx11_64_release\tbbmalloc.dll  -Xlinker /MANIFEST:EMBED -Xlinker /implib:clang_20.1_cxx11_64_release\tbbmalloc.lib -Xlinker /pdb:clang_20.1_cxx11_64_release\tbbmalloc.pdb -Xlinker /version:2.16 src/tbbmalloc/CMakeFiles/tbbmalloc.dir/backend.cpp.obj src/tbbmalloc/CMakeFiles/tbbmalloc.dir/backref.cpp.obj src/tbbmalloc/CMakeFiles/tbbmalloc.dir/frontend.cpp.obj src/tbbmalloc/CMakeFiles/tbbmalloc.dir/large_objects.cpp.obj src/tbbmalloc/CMakeFiles/tbbmalloc.dir/tbbmalloc.cpp.obj src/tbbmalloc/CMakeFiles/tbbmalloc.dir/__/tbb/itt_notify.cpp.obj src/tbbmalloc/CMakeFiles/tbbmalloc.dir/tbbmalloc.rc.res  -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 -loldnames  && C:\WINDOWS\system32\cmd.exe /C "cd /D C:\Users\solom\Downloads\oneTBB\build\src\tbbmalloc && "C:\Program Files\PowerShell\7\pwsh.exe" -noprofile -executionpolicy Bypass -file C:/Users/solom/Downloads/vcpkg/scripts/buildsystems/msbuild/applocal.ps1 -targetBinary C:/Users/solom/Downloads/oneTBB/build/clang_20.1_cxx11_64_release/tbbmalloc.dll -installedDir C:/Users/solom/Downloads/vcpkg/installed/x64-windows/bin -OutVariable out""
lld-link: warning: ignoring unknown argument '--version-script=C:/Users/solom/Downloads/oneTBB/src/tbbmalloc/def/lin64-tbbmalloc.def'
lld-link: warning: ignoring unknown argument '-z'
lld-link: warning: ignoring unknown argument '-z'
lld-link: warning: ignoring unknown argument '-z'
lld-link: error: could not open 'relro': no such file or directory
lld-link: error: could not open 'now': no such file or directory
lld-link: error: could not open 'noexecstack': no such file or directory
clang: error: linker command failed with exit code 1 (use -v to see invocation)
[28/331] Building CXX object src/tbb/CMakeFiles/tbb.dir/main.cpp.obj
In file included from C:/Users/solom/Downloads/oneTBB/src/tbb/main.cpp:22:
C:/Users/solom/Downloads/oneTBB/src/tbb\environment.h:39:31: warning: 'getenv' is deprecated: This function or variable may be unsafe. Consider using _dupenv_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [-Wdeprecated-declarations]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Does not build on clang on windows due to flag -fPIC not being suppored
1 participant
0