Hello,
There seems to be a regression with macOS SDK 15 and dynamically loading libraries if Address Sanitizer is turned on. Seems to only affect Debug builds, and .frameworks. I've also reported this via the Feedback Assistant: FB16513866
Here's a minimal repro, if anyone is interested: https://gist.github.com/peter-esik/6b00432e411be85333e14ae7d953966e
I thought I'd post this here, as according to my web searches, this isn't a very well-known bug at this point.
LLVM
RSS for tagThe 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
24 Posts
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
I have the 'warnings as errors' policy set to Yes for Apple Clang and Swift compiler.
As far as I know, there is no way to make exceptions to the warning policies from Swift compiler (correct me if I am wrong), what about Clang warning policies, specifically when it comes to header files from 3rd party pods? They don't show up on the Compile Sources so I can't apply flags such as -Wno-error=deprecated to them. Adding #pragma GCC... to them won't help as a fresh pod install will wipe the #pragma statements out.
Is there a way to exclude the header files from pods from getting the warning policies from Clang so I won't see errors from them when compiling Clang modules that's a part of the build process?
I recently wrote an article on getting gtk auto complete/syntax highlighting on macOS
its a genuinely fun hobby to make portable software, and this method will ultimately help in porting software to the macOS platform
a copy and paste:
before I continue, I want to mention that emacs auto completion, using company-mode, is rather slow when it comes to parsing a ton files, and in some configurations, especially recursively when it comes to parsing and displaying functions and macros, even when using the semantic auto complete system, but I do believe it speeds up when you initially parse and save to ctags or when you build a semanticdb, functions such as g_signal_connect() and macros such as G_APPLICATION however, did not work with company modes auto complete, but worked with flycheck on the fly syntax checking, using this method, and I haven’t had time to perfect an emacs configuration; maybe some time next week
you will need gtk installed from brew or ports, since gtk has trouble compiling from source on some Mac configurations. this method works with whatever version of gtk is reported by pkg-config –cflags (pkg-config --cflags gtk. you will also need pkg-config installed, multiple installations of gtk can be used and utilized
but the emacs plugins you’ll need are (and you’ll need to connect to Melpa using list-packages https://melpa.org/#/getting-started to have these automatically downloaded and configured):
company
company-c-headers
flycheck
flycheck-pkg-config
exec-path-from-shell (this allows x11emacs to read the shells configuration, may be option for terminal based emac uses)
optional: function-args-mode, but when fa-show-auto is used, it breaks themes in emacs
download all of them through M-x list-packages (which means pressing alt+x, macOS option+x, which should issue an input on the bottom of emacs, where the status bar is), after that, type list-packages or use auto completion, aka ctrl+tab to cycle through possible candidates
open a c file (C-f ~/test.c) (which is control+x, macOS control+x)
type in:
M-x semantic-mode
M-x semantic-customize-system-include-path
in semantic-customize-system-include-path, add the path to the gtk version you intend to develop for, in my case /opt/homebrew/Cellar/gtk4/4.16.12/include/gtk-4.0 using the text based interface; you should be able to use your mouse (click ins after where it says /usr/include. semantic is included in emacs. options are automatically saved at command)
M-x exec-path-from-shell-initialize
M-x flycheck-mode
M-x flycheck-pkg-config
in flycheck-pkg-config, press enter, and then type the name of the version of gtk that provides valid input from pkg-config (ie gtk4)
M-x global-company-mode
if you need to bind ctrl+tab to auto complete, you can add this to your config (~/.emacs.d/init.el)
(global-set-key (kbd “C-”) ‘company-semantic)
this will do most of the grunt work when plugins are installed (ctrl-tab shows a window to auto complete, ctrl+` (thats the key before 1, with shift it becomes ~) shows function argument. fa-show-auto automatically shows function prototypes, but can break emacs themes:
(require ‘package)
(add-to-list ‘package-archives ‘(“melpa” . “https://melpa.org/packages/”) t)
;; Comment/uncomment this line to enable MELPA Stable if desired. See package-archive-priorities
;; and package-pinned-packages. Most users will not need or want to do this.
;;(add-to-list ‘package-archives ‘(“melpa-stable” . “https://stable.melpa.org/packages/”) t)
(package-initialize)
(global-company-mode t)
(global-flycheck-mode t)
(semantic-mode t)
(function-args-mode)
(global-company-mode t)
(global-flycheck-mode t)
(semantic-mode t)
(function-args-mode)
(global-set-key (kbd “C-”) ‘company-semantic)
(global-set-key (kbd “C-`”) ‘fa-show)
if you need to compile from inside emacs, I would make a Makefile according to the gtk tutorial on gtk.org
I also have another article on getting Xcode to work with gtk, which is more reliable: https://unix-world.com/2025/01/25/getting-gtk4-to-work-in-xcode-with-auto-complete-and-syntax-highlighting/
website is unix-world.com and I welcome any and all traffic !
We have a big iOS project and we are using .xcconfig files to define our compiler options and build settings.
We have our SWIFT_TREAT_WARNINGS_AS_ERRORS set to YES so that all Swift related warnings will be reported as errors.
Now, we are trying to migrate to Xcode 16.1 and set 'targeted' in the 'Strict Concurrency Checking' flag. This produces some errors that are related to Swift's concurrency checks.
We are now planning to have an approach where we still want to keep SWIFT_TREAT_WARNINGS_AS_ERRORS as is but we want all concurrency related warnings to be still treated as warnings while the rest will get reported as errors.
We found this new compiler option - https://forums.swift.org/t/warnings-as-errors-exceptions/72925.
It looks like the one we want but I think it is still not out yet and we need to wait until Swift 6.1 (correct me if im wrong).
Or is there any other way to do what we want to achieve?