command line tool triggering syspolicyd

Background:

I am building a compiler (for self-education) together with a test suite that compiles and runs hundreds of test cases.


Problem:

Testing is slowed down significantly due to the generated excutables seemingly causing syspolicyd to phone home (observed using Little Snitch).


Please advise how I might build a command line tool, for my own use, which does not trigger syspolicyd?


Reproducer:

I use a command of this form to build and test ~100 executables from assembler source...

$ for t in testcase.*.s
        clang $t -o out
        ./out
    end


time command output, with network connection:

32.28 real 5.53 user 10.70 sys

And with network connection (WiFi) disabled:

21.58 real 5.40 user 10.41 sys


Sample data:

$ cat testcase.1.s
  .section __TEXT,__text
  .globl _main
_main:
  pushq  %rbp
  movq   %rsp, %rbp
  movl   $1, %eax
  popq   %rbp
  retq


More Information:

The same failure is observed when using the standard clang toolchain (clang testcase.1.c -o out) so the failure does not seem to be related to the very minimal assembly code that I am generating.


Configuration:

$ uname -a

Darwin Ians-MacBook-Pro.local 19.4.0 Darwin Kernel Version 19.4.0: Wed Mar 4 22:28:40 PST 2020; root:xnu-6153.101.6~15/RELEASE_X86_64 x86_64


$ xcode-select -v

xcode-select version 2373.


$ clang -v

Apple clang version 11.0.3 (clang-1103.0.32.59)

Target: x86_64-apple-darwin19.4.0

Thread model: posix

InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

Replies

This is apparently normal behaviour of macOS 10.15.


The solution (or workaround?) is to tick Terminal in the Developer Tools category in the Security & Privacy preferences pane.