Skip to content

Commit

Permalink
Reorder compiler flags to adjust include path priority
Browse files Browse the repository at this point in the history
  • Loading branch information
povik committed Feb 1, 2025
1 parent 4f32cd9 commit 39fb317
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,18 @@ install: build/slang.so
mkdir -p $(PLUGINDIR)
cp $< $(PLUGINDIR)

# Note: -Ibuild/slang_install/include must appear before --cxxflags
# in case there's a slang install at the Yosys install prefix
-include $(OBJS:.o=.d)
build/%.o: src/%.cc build/slang_install/.built
@mkdir -p $(@D)
@echo " CXX $@"
@$(YOSYS_CONFIG) --exec --cxx --cxxflags -O3 -g -I . -MD \
-c -o $@ $< -std=c++20 \
$(CXXFLAGS) \
@$(YOSYS_CONFIG) --exec --cxx \
-DSLANG_BOOST_SINGLE_HEADER \
-Ibuild/slang_install/include
-Ibuild/slang_install/include \
--cxxflags -O3 -g -I . -MD \
-c -o $@ $< -std=c++20 \
$(CXXFLAGS)

build/slang.so: $(OBJS)
@mkdir -p $(@D)
Expand Down

0 comments on commit 39fb317

Please sign in to comment.