The LLVM compiler is the next-generation compiler introduced in Xcode 3.2 for Snow Leopard based on the open source LLVM.org project.

Posts under LLVM tag

55 results found
Sort by:
Post not yet marked as solved
34 Views

All Objective-C++ code breaks when setting C++20

I'm trying to update all my projects to C++20. The C++ only projects work fine. All the Objective-C++ files, though, suddenly stop compiling. Is this supposed to work. I can't imagine [NSString stringWithUTF8String:foo] should be failing. Setting the project back to C++17 works. I do have -fmodules and -fcxx-modules for clang modules in some projects. Do those all need to be removed for C++20 modules?
Asked
by Alecazam.
Last updated
.
Post not yet marked as solved
497 Views

semaphore:202:10: note: 'acquire' has been explicitly marked unavailable here [build] void acquire()

I use clang 12 to build some cpp project that needs semaphore.acquire() function. System version: MacOs Big Sur 12.0 However, Compiler shows that some function is unavailable. Detail messages: /concurrencpp/source/executors/worker_thread_executor.cpp:42:21: error: 'acquire' is unavailable [build] m_semaphore.acquire(); [build] ^ [build] /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/semaphore:202:10: note: 'acquire' has been explicitly marked unavailable here [build] void acquire() [build] ^ [build] /Users/mirocos/master/study/concurrencpp/source/executors/worker_thread_executor.cpp:106:21: error: 'release' is unavailable [build] m_semaphore.release(); [build] ^ [build] /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/semaphore:197:10: note: 'release' has been explicitly marked unavailable here [build] void release(ptrdiff_t __update = 1) [build] ^ [build] /Users/mirocos/master/study/concurrencpp/source/executors/worker_thread_executor.cpp:121:21: error: 'release' is unavailable [build] m_semaphore.release(); [build] ^ [build] /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/semaphore:197:10: note: 'release' has been explicitly marked unavailable here [build] void release(ptrdiff_t __update = 1) [build] ^ [build] /Users/mirocos/master/study/concurrencpp/source/executors/worker_thread_executor.cpp:160:17: error: 'release' is unavailable [build] m_semaphore.release(); [build] ^ [build] /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/semaphore:197:10: note: 'release' has been explicitly marked unavailable here [build] void release(ptrdiff_t __update = 1) [build] ^ [build] /Users/mirocos/master/study/concurrencpp/source/executors/thread_pool_executor.cpp:218:26: error: 'try_acquire_until' is unavailable [build] if (!m_semaphore.try_acquire_until(deadline)) { [build] ^ [build] /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/semaphore:219:10: note: 'try_acquire_until' has been explicitly marked unavailable here [build] bool try_acquire_until(chrono::time_point<Clock, Duration> const& __abs_time) [build] ^ [build] /Users/mirocos/master/study/concurrencpp/source/executors/thread_pool_executor.cpp:218:26: error: 'try_acquire_until<std::__1::chrono::steady_clock, std::__1::chrono::duration<long long, std::__1::ratio<1, 1000000000>>>' is unavailable [build] if (!m_semaphore.try_acquire_until(deadline)) { [build] ^ [build] /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/semaphore:219:10: note: 'try_acquire_until<std::__1::chrono::steady_clock, std::__1::chrono::duration<long long, std::__1::ratio<1, 1000000000>>>' has been explicitly marked unavailable here [build] bool try_acquire_until(chrono::time_point<Clock, Duration> const& __abs_time) [build] ^ [build] /Users/mirocos/master/study/concurrencpp/source/executors/thread_pool_executor.cpp:322:25: error: 'release' is unavailable [build] m_semaphore.release(); [build] ^ [build] /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/semaphore:197:10: note: 'release' has been explicitly marked unavailable here [build] void release(ptrdiff_t __update = 1) [build] ^ [build] /Users/mirocos/master/study/concurrencpp/source/executors/thread_pool_executor.cpp:420:17: error: 'release' is unavailable [build] m_semaphore.release(); [build] ^ [build] /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/semaphore:197:10: note: 'release' has been explicitly marked unavailable here [build] void release(ptrdiff_t __update = 1) [build] ^ [build] 4 errors generated. can anyone could help me with it?
Asked
by mirocos.
Last updated
.
Post not yet marked as solved
25k Views

XCode 10 - "new" file not found

Hello,Just upgraded XCode to version 10. I tried to compile my project which use both Objective-C and C++ files.One of the cpp files includes a header file (.h) which has the following line:#include &lt;new&gt;Compiler gives this error: 'new' file not foundWhy is that? I didn't have this problem with XCode 9.Thanks,Kal
Asked
by KalMudov.
Last updated
.
Post marked as solved
108 Views

dieharder compilation failure on Apple Silicon: 'ld: symbol(s) not found for architecture arm64'

Attempting to compile dieharder from source on an M1 Max MacBookPro18,2 (macOS 12 + Xcode 13.3.1 + command line tools) and running into an error: ... /bin/sh ../libtool --tag=CC --mode=link gcc -std=c99 -Wall -pedantic -I/usr/local/include -I/opt/local/include -L/opt/local/lib -o dieharder dieharder-add_ui_rngs.o dieharder-add_ui_tests.o dieharder-choose_rng.o dieharder-dieharder.o dieharder-dieharder_exit.o dieharder-help.o dieharder-list_rngs.o dieharder-list_tests.o dieharder-output.o dieharder-output_rnds.o dieharder-parsecl.o dieharder-rdieharder.o dieharder-run_all_tests.o dieharder-run_test.o dieharder-set_globals.o dieharder-testbits.o dieharder-time_rng.o dieharder-user_template.o ../libdieharder/libdieharder.la -lgsl -lgslcblas -lm -lgsl -lgslcblas libtool: link: gcc -std=c99 -Wall -pedantic -I/usr/local/include -I/opt/local/include -o dieharder dieharder-add_ui_rngs.o dieharder-add_ui_tests.o dieharder-choose_rng.o dieharder-dieharder.o dieharder-dieharder_exit.o dieharder-help.o dieharder-list_rngs.o dieharder-list_tests.o dieharder-output.o dieharder-output_rnds.o dieharder-parsecl.o dieharder-rdieharder.o dieharder-run_all_tests.o dieharder-run_test.o dieharder-set_globals.o dieharder-testbits.o dieharder-time_rng.o dieharder-user_template.o -L/opt/local/lib ../libdieharder/.libs/libdieharder.a -lm -lgsl -lgslcblas Undefined symbols for architecture arm64: "_insert", referenced from: _dab_filltree in libdieharder.a(libdieharder_la-dab_filltree.o) _main_filltree in libdieharder.a(libdieharder_la-dab_filltree.o) "_insertBit", referenced from: _dab_filltree2 in libdieharder.a(libdieharder_la-dab_filltree2.o) ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation) ... I got to this failure with a MacPorts installed gsl and by executing the following: $ mkdir dieharder; cd dieharder $ wget --no-check-certificate https://webhome.phy.duke.edu/~rgb/General/dieharder/dieharder-3.31.1.tgz $ tar xf dieharder-3.31.1.tgz $ cd dieharder-3.31.1 $ sudo port install gsl $ ./configure LDFLAGS=-L/opt/local/lib CPPFLAGS=-I/opt/local/include CFLAGS=-I/opt/local/include --disable-shared ... $ make ... I reproduced the failure with Homebrew: $ brew install gsl $ make distclean $ ./configure LDFLAGS=-L/opt/homebrew/lib CPPFLAGS=-I/opt/homebrew/include CFLAGS=-I/opt/homebrew/include --disable-shared ... $ make ... /bin/sh ../libtool --tag=CC --mode=link gcc -std=c99 -Wall -pedantic -I/usr/local/include -I/opt/homebrew/include -L/opt/homebrew/lib -o dieharder dieharder-add_ui_rngs.o dieharder-add_ui_tests.o dieharder-choose_rng.o dieharder-dieharder.o dieharder-dieharder_exit.o dieharder-help.o dieharder-list_rngs.o dieharder-list_tests.o dieharder-output.o dieharder-output_rnds.o dieharder-parsecl.o dieharder-rdieharder.o dieharder-run_all_tests.o dieharder-run_test.o dieharder-set_globals.o dieharder-testbits.o dieharder-time_rng.o dieharder-user_template.o ../libdieharder/libdieharder.la -lgsl -lgslcblas -lm -lgsl -lgslcblas libtool: link: gcc -std=c99 -Wall -pedantic -I/usr/local/include -I/opt/homebrew/include -o dieharder dieharder-add_ui_rngs.o dieharder-add_ui_tests.o dieharder-choose_rng.o dieharder-dieharder.o dieharder-dieharder_exit.o dieharder-help.o dieharder-list_rngs.o dieharder-list_tests.o dieharder-output.o dieharder-output_rnds.o dieharder-parsecl.o dieharder-rdieharder.o dieharder-run_all_tests.o dieharder-run_test.o dieharder-set_globals.o dieharder-testbits.o dieharder-time_rng.o dieharder-user_template.o -L/opt/homebrew/lib ../libdieharder/.libs/libdieharder.a -lm -lgsl -lgslcblas Undefined symbols for architecture arm64: "_insert", referenced from: _dab_filltree in libdieharder.a(libdieharder_la-dab_filltree.o) _main_filltree in libdieharder.a(libdieharder_la-dab_filltree.o) "_insertBit", referenced from: _dab_filltree2 in libdieharder.a(libdieharder_la-dab_filltree2.o) ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[1]: *** [dieharder] Error 1 make: *** [dieharder.time] Error 2 Anyone know what might be going on here and how to properly configure this to complete compilation on and for Apple Silicon systems?
Asked Last updated
.
Post not yet marked as solved
630 Views

Xcode 13.3 - LLVM Error when building app

Just upgraded from Xcode 12 to Xcode 13.3 (latest) and now suddenly am getting a LLVM Error when archiving my app. See error message below. Google tells me that many users seem to have this issue, some related to unused dependencies or not enough memory, neither of which is the case for me. Appreciate if one of the experts here can advise, pretty new to Xcode and not sure how to best proceed. Thank you LLVM ERROR: out of memory Allocation failed Please submit a bug report (https://swift.org/contributing/#reporting-bugs) and include the project and the crash backtrace. Stack dump: 0. Program arguments: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-frontend -frontend -c -primary-file /Users/User/Library/Developer/Xcode/DerivedData/WebViewGold-glchvbqylkvqybgbbhuuzlgneyle/Build/Intermediates.noindex/ArchiveIntermediates/WebViewGold/IntermediateBuildFilesPath/AG-Opus.build/Release-iphoneos/Appname.build/Objects-normal/arm64/WebViewController.bc -embed-bitcode -target arm64-apple-ios12.0 -Xllvm -aarch64-use-tbi -O -disable-llvm-optzns -module-name AG_Opus -o /Users/User/Library/Developer/Xcode/DerivedData/WebViewGold-glchvbqylkvqybgbbhuuzlgneyle/Build/Intermediates.noindex/ArchiveIntermediates/WebViewGold/IntermediateBuildFilesPath/Appname.build/Release-iphoneos/Appname.build/Objects-normal/arm64/WebViewController.o 1. Apple Swift version 5.6 (swiftlang-5.6.0.323.62 clang-1316.0.20.8) 2. Compiling with the current language version 3. Running pass 'Function Pass Manager' on module '/Users/User/Library/Developer/Xcode/DerivedData/WebViewGold-glchvbqylkvqybgbbhuuzlgneyle/Build/Intermediates.noindex/ArchiveIntermediates/WebViewGold/IntermediateBuildFilesPath/Appname.build/Release-iphoneos/Appname.build/Objects-normal/arm64/WebViewController.bc'. 4. Running pass 'ObjC ARC contraction' on function '@UI_USER_INTERFACE_IDIOM' Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it): 0  swift-frontend           0x000000010eb13de7 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 39 1  swift-frontend           0x000000010eb12e38 llvm::sys::RunSignalHandlers() + 248 2  swift-frontend           0x000000010eb14440 SignalHandler(int) + 288 3  libsystem_platform.dylib 0x00007ff804caedfd _sigtramp + 29 4  libsystem_malloc.dylib   0x00007ff804accabb _malloc_zone_malloc + 125 5  libsystem_c.dylib        0x00007ff804be4d24 abort + 123 6  swift-frontend           0x000000010ea60cda llvm::report_bad_alloc_error(char const*, bool) + 106 7  swift-frontend           0x000000010ea60cf2 out_of_memory_new_handler() + 18 8  libc++abi.dylib          0x00007ff804c5696b operator new(unsigned long) + 43 9  swift-frontend           0x000000010e821efd llvm::Function::BuildLazyArguments() const + 77 10 swift-frontend           0x000000010c60ae87 llvm::objcarc::BundledRetainClaimRVs::insertRVCallWithColors(llvm::Instruction*, llvm::CallBase*, llvm::DenseMap<llvm::BasicBlock*, llvm::TinyPtrVector<llvm::BasicBlock*>, llvm::DenseMapInfo<llvm::BasicBlock*>, llvm::detail::DenseMapPair<llvm::BasicBlock*, llvm::TinyPtrVector<llvm::BasicBlock*> > > const&) + 151 11 swift-frontend           0x000000010c61df88 (anonymous namespace)::ObjCARCContract::run(llvm::Function&, llvm::AAResults*, llvm::DominatorTree*) + 1384 12 swift-frontend           0x000000010e859380 llvm::FPPassManager::runOnFunction(llvm::Function&) + 1488 13 swift-frontend           0x000000010e860073 llvm::FPPassManager::runOnModule(llvm::Module&) + 67 14 swift-frontend           0x000000010e859b39 llvm::legacy::PassManagerImpl::run(llvm::Module&) + 1161 15 swift-frontend           0x0000000109d776df swift::performLLVMOptimizations(swift::IRGenOptions const&, llvm::Module*, llvm::TargetMachine*) + 3791 16 swift-frontend           0x0000000109d788cc swift::performLLVM(swift::IRGenOptions const&, swift::DiagnosticEngine&, llvm::sys::SmartMutex<false>*, llvm::GlobalVariable*, llvm::Module*, llvm::TargetMachine*, llvm::StringRef, swift::UnifiedStatsReporter*) + 2812 17 swift-frontend           0x0000000109d81aa5 swift::performLLVM(swift::IRGenOptions const&, swift::ASTContext&, llvm::Module*, llvm::StringRef) + 213 18 swift-frontend           0x000000010983c795 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 16565 19 swift-frontend           0x00000001097fb5d4 swift::mainEntry(int, char const**) + 1108 20 dyld                     0x000000011ceb751e start + 462 error: Abort trap: 6 (in target 'Appname' from project 'Projectname')
Asked Last updated
.
Post not yet marked as solved
116 Views

How do I enable/disable individual optimizations in Apple's Clang?

I work on a very large project based on Mozilla Firefox, I am getting a crash at -O2 and -O3. It is stable at -O0 and -O1, so I did some research and found a number of optimizations that supposedly get enabled at -O2. The information I found tells me that I should use -mllvm and the optimization flag that gets passed to the LLVM "opt" command in the normal LLVM toolchain. However Apple's command line tools do not have the "opt" command and -mllvm does not seem to accept the "opt" flags. What is the Apple way of seeing what optimizations are enabled in -O2 and how do I enable or disable them individually?
Asked
by dbsoft.
Last updated
.
Post not yet marked as solved
195 Views

libc++ list.h broken error Xcode 13.3 macOS Monterey 12.3.1

Hi, I am using, inside my Xcode project, the snacc library (https://github.com/nevali/snacc) which uses the libc++ which comes with Xcode. I'm using Xcode 13.3 (13E113) on macOS Monterey 12.3.1. The compilation with the Xcode command-line tool fails with these errors: In file included from /Users/idplug-middleware/Work/idplug-ios-generic-api/idplug-classic/external_sdks/snacc/src/inc/asn-buf.h:12: /Applications/Xcode13.3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.4.sdk/usr/include/c++/v1/list:1164:11: error: use of undeclared identifier '_A' list<_Tp, _A*lloc>::__link_nodes(__link_pointer __p, __link_pointer __f, __link_pointer __l)           ^ /Applications/Xcode13.3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.4.sdk/usr/include/c++/v1/list:1164:14: error: use of undeclared identifier 'lloc' list<_Tp, _A*lloc>::__link_nodes(__link_pointer __p, __link_pointer __f, __link_pointer __l)              ^ /Applications/Xcode13.3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.4.sdk/usr/include/c++/v1/list:1164:34: error: unknown type name '__link_pointer' list<_Tp, _A*lloc>::__link_nodes(__link_pointer __p, __link_pointer __f, __link_pointer __l)                                  ^ /Applications/Xcode13.3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.4.sdk/usr/include/c++/v1/list:1164:54: error: unknown type name '__link_pointer' list<_Tp, _A*lloc>::__link_nodes(__link_pointer __p, __link_pointer __f, __link_pointer __l)                                                      ^ /Applications/Xcode13.3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.4.sdk/usr/include/c++/v1/list:1164:74: error: unknown type name '__link_pointer' list<_Tp, _A*lloc>::__link_nodes(__link_pointer __p, __link_pointer __f, __link_pointer __l) Is there anything wrong with the libc++ library that comes with Xcode 13.3 ? Or am I doing something wrong ? I have never had this issue before with older versions of Xcode or macOS. Thank you. Christophe
Asked Last updated
.
Post not yet marked as solved
305 Views

During debug output (po) of an iOS app Swift/ObjC, bridging headers cannot be found (Version 13.2.1 (13C100)

The bridging header works fine for compilation, and with previous version of xcode there were no problems running and debugging the app. But after switching to 13.2.1, poing a variable leads first to error: expression failed to parse, unknown error, and then to an error hinting at not being able to find header files. Example: (lldb) po recipientType error: expression failed to parse, unknown error (lldb) po recipientType warning: Swift error in scratch context: error: /Users/dirk/projects/pEp/src_iOS/pep4ios/pEpForiOS/pEpForiOS-Bridging-Header.h:14:9: error: 'AccountSettings.h' file not found #import "AccountSettings.h"         ^ error: failed to import bridging header '/Users/dirk/projects/pEp/src_iOS/pep4ios/pEpForiOS/pEpForiOS-Bridging-Header.h' . Shared Swift state for pEp has developed fatal errors and is being discarded. REPL definitions and persistent names/types will be lost. error: expression failed to parse, unknown error I have experimented with using <> for the import, instead of "", and also setting the framework header path, but no luck so far.
Asked
by DSec.
Last updated
.
Post not yet marked as solved
380 Views

LLVM Profile Error: Failed to write file : Filename not set

Hello everyone, I'm running some tests and after upgrading my Xcode from 12.5 to 13.2.1, I can't run them anymore. It shows me "Testing..." and after waiting 10 minutes it fails and this output is presented in the console: LLVM Profile Error: Failed to write file : Filename not set LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Error: Failed to write file : Filename not set LLVM Profile Error: Failed to write file : Filename not set LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Error: Failed to write file : Filename not set LLVM Profile Error: Failed to write file : Filename not set LLVM Profile Error: Failed to write file : Filename not set LLVM Profile Error: Failed to write file : Filename not set LLVM Profile Error: Failed to write file : Filename not set LLVM Profile Error: Failed to write file : Filename not set LLVM Profile Error: Failed to write file : Filename not set LLVM Profile Error: Failed to write file : Filename not set LLVM Profile Error: Failed to write file : Filename not set LLVM Profile Error: Failed to write file : Filename not set LLVM Profile Error: Failed to write file : Filename not set LLVM Profile Error: Failed to write file : Filename not set LLVM Profile Error: Failed to write file : Filename not set LLVM Profile Error: Failed to write file : Filename not set LLVM Profile Error: Failed to write file : Filename not set LLVM Profile Error: Failed to write file : Filename not set LLVM Profile Error: Failed to write file : Filename not set LLVM Profile Error: Failed to write file : Filename not set LLVM Profile Error: Failed to write file : Filename not set LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Error: Failed to write file : Filename not set LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Error: Failed to write file : Filename not set LLVM Profile Error: Failed to write file : Filename not set LLVM Profile Error: Failed to write file : Filename not set LLVM Profile Error: Failed to write file : Filename not set LLVM Profile Error: Failed to write file : Filename not set LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Error: Failed to write file : Filename not set LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Error: Failed to write file : Filename not set LLVM Profile Error: Failed to write file : Filename not set LLVM Profile Error: Failed to write file : Filename not set LLVM Profile Error: Failed to write file : Filename not set LLVM Profile Error: Failed to write file : Filename not set LLVM Profile Error: Failed to write file : Filename not set LLVM Profile Error: Failed to write file : Filename not set LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Error: Failed to write file : Filename not set LLVM Profile Error: Failed to write file : Filename not set LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Error: Failed to write file : Filename not set LLVM Profile Error: Failed to write file : Filename not set LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Note: Profile data not written to file: already written. LLVM Profile Error: Failed to write file : Filename not set LLVM Profile Error: Failed to write file : Filename not set LLVM Profile Error: Failed to write file : Filename not set I'm using an iPhone 11 Simulator (version 13.2) running iOS 15.2 Any ideas?
Asked
by dbug18.
Last updated
.
Post not yet marked as solved
141 Views

C++20 Full Support Road Map?

Hi I'm using C++17 in XCode 13 and looking at the release notes it shows that C++20 is only partially supported - does anyone know when C++20 will be fully supported in XCode ? [C++23 is out next year and would be useful to see some statement from Apple about their plans to support this]
Asked
by davpea.
Last updated
.
Post not yet marked as solved
542 Views

Umbrella header imported into generated swift header

I have a framework with both Swift and Objective-C code. For some reason, the compiler decided that it was necessary to import the framework's umbrella header in its generated Swift.h file. This is causing duplicate definition errors and preventing me from compiling.Example:Framework called "MyFramework"Swift code generates "MyFramework-Swift.h"Contents of MyFramework-Swift.h includes this line:#import &lt;MyFramework/MyFramework.h&gt;This causes the errors and prevents me from building. Changing random lines of Swift code seems to make it NOT put this line in the Swift.h file, but this is not a working solution for me as I need the line of Swift code in question. It was not causing this error before.Any hints on how to prevent the compiler from putting its own umbrella header into the generated Swift.h file?
Asked
by tracyk.
Last updated
.
Post not yet marked as solved
3.8k Views

Using private Objective-C files from Swift within the same framework

We currently have a legacy Objective-C framework that we'd like to introduce some Swift components into. However, I can't figure out how to access the Private- and Project-scoped Objective-C files from our Swift files.We already use an umbrella header and a modulemap file to declare the public headers that should be included in the library's module, and we want to keep these as the only publicly exposed files. However, our new Swift files (within the same framework) need to also access private headers that we don't want to expose.I've already tried defining a private modulemap file that lists the private headers I want to use, and then specified it with the MODULEMAP_PRIVATE_FILE build setting, but I dont think this does what we want. It appears to introduce a new MyLibrary.Private module which is publicly visible to external targets (such as the unit test target) but is still not available to the Swift files within the framework.Any suggestions of how this can be accomplished, or experience doing this in other projects would be greatly appreicated.Thanks!
Asked Last updated
.
Post not yet marked as solved
173 Views

How do I specify using custom dsymutil?

I am working with a big project event is take 40 minutes to generate dSYM file. Is there any way I can replace the dsymutil with custom version.
Asked Last updated
.
Post not yet marked as solved
205 Views

tapi-1100.0.11 from https://opensource.apple.com/source/tapi/ does not build with the llvm version mentioned in Readme.md

I was attempting to build tapi-1100.0.11 since it is required by ld64 (building which was my initial goal), but it fails due to different issues. I followed the Readme.md guidelines and used https://github.com/apple/llvm-project/tree/apple/stable/20190104, but there seem to be several issues: LinkerInterfaceFile.cpp uses MachO::PLATFORM_DRIVERKIT in two switch statements, but this enumeration value is not present in the given tag in llvm-project (https://github.com/apple/llvm-project/blob/729748d085a90bd2a4af36efbfb2dc33b4704de3/llvm/include/llvm/BinaryFormat/MachO.h#L485), and seems to be only added with commit https://github.com/apple/llvm-project/commit/eef41efe0098814ba8445633c7bc6756d4228f8a Even if I #if 0 out these statements everything fails with linking error regarding missing library -ltapiAPIVerifier, I see that a lot of the cmake files add tapi-api-verifier as a linker input, but I don't see any library targets being added anywhere, so how to resolve this? Is there a different tapi version that is working with a different llvm version, which I can build without such hassle? I tried reverting ld64 to older tags, but all seem to require tapi. Using newer apple/stable/xxxx tags seem to be incompatible with the tapi source, since they require that projects use add_llvm_install_targets which tapi does not do.
Asked
by rubu.
Last updated
.
Post not yet marked as solved
576 Views

C++20 Support.

When does support of the language will be rescheduled from the clang-llvm to the Xcode? For example 13.0.0 llvm has implementation of the of the core language instead of the Xcode 13.2beta... Also interesting when does Xcode editor begin understand that 'requires', 'concept' is new keywords in the C++?
Asked Last updated
.