Revert "Semaphore optimization flags"

This reverts commit 9dfd14345086fb43188e436d70cb21c69dd44ba6.