mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-11-04 13:29:12 +00:00 
			
		
		
		
	Makefile: no LTO and lld by default
This commit is contained in:
		
							parent
							
								
									01b99972b4
								
							
						
					
					
						commit
						eeecb54532
					
				
					 4 changed files with 16 additions and 3 deletions
				
			
		
							
								
								
									
										2
									
								
								.github/workflows/test-build.yml
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/test-build.yml
									
										
									
									
										vendored
									
									
								
							| 
						 | 
					@ -56,7 +56,7 @@ jobs:
 | 
				
			||||||
          mkdir build
 | 
					          mkdir build
 | 
				
			||||||
          cd build
 | 
					          cd build
 | 
				
			||||||
          make -f ../Makefile config-$CC
 | 
					          make -f ../Makefile config-$CC
 | 
				
			||||||
          make -f ../Makefile -j$procs
 | 
					          make -f ../Makefile -j$procs ENABLE_LTO=1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Log yosys-config output
 | 
					      - name: Log yosys-config output
 | 
				
			||||||
        run: |
 | 
					        run: |
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										2
									
								
								.github/workflows/test-verific.yml
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/test-verific.yml
									
										
									
									
										vendored
									
									
								
							| 
						 | 
					@ -41,7 +41,7 @@ jobs:
 | 
				
			||||||
          echo "ENABLE_VERIFIC_LIBERTY := 1" >> Makefile.conf
 | 
					          echo "ENABLE_VERIFIC_LIBERTY := 1" >> Makefile.conf
 | 
				
			||||||
          echo "ENABLE_VERIFIC_YOSYSHQ_EXTENSIONS := 1" >> Makefile.conf
 | 
					          echo "ENABLE_VERIFIC_YOSYSHQ_EXTENSIONS := 1" >> Makefile.conf
 | 
				
			||||||
          echo "ENABLE_CCACHE := 1" >> Makefile.conf
 | 
					          echo "ENABLE_CCACHE := 1" >> Makefile.conf
 | 
				
			||||||
          make -j${{ env.procs }}
 | 
					          make -j${{ env.procs }} ENABLE_LTO=1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Install Yosys
 | 
					      - name: Install Yosys
 | 
				
			||||||
        run: |
 | 
					        run: |
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										4
									
								
								Makefile
									
										
									
									
									
								
							
							
						
						
									
										4
									
								
								Makefile
									
										
									
									
									
								
							| 
						 | 
					@ -34,7 +34,7 @@ ENABLE_PYOSYS := 0
 | 
				
			||||||
ENABLE_GCOV := 0
 | 
					ENABLE_GCOV := 0
 | 
				
			||||||
ENABLE_GPROF := 0
 | 
					ENABLE_GPROF := 0
 | 
				
			||||||
ENABLE_DEBUG := 0
 | 
					ENABLE_DEBUG := 0
 | 
				
			||||||
ENABLE_LTO := 1
 | 
					ENABLE_LTO := 0
 | 
				
			||||||
ENABLE_CCACHE := 0
 | 
					ENABLE_CCACHE := 0
 | 
				
			||||||
# sccache is not always a drop-in replacement for ccache in practice
 | 
					# sccache is not always a drop-in replacement for ccache in practice
 | 
				
			||||||
ENABLE_SCCACHE := 0
 | 
					ENABLE_SCCACHE := 0
 | 
				
			||||||
| 
						 | 
					@ -223,7 +223,9 @@ LTOFLAGS := $(GCC_LTO)
 | 
				
			||||||
ifeq ($(CONFIG),clang)
 | 
					ifeq ($(CONFIG),clang)
 | 
				
			||||||
CXX = clang++
 | 
					CXX = clang++
 | 
				
			||||||
CXXFLAGS += -std=$(CXXSTD) $(OPT_LEVEL)
 | 
					CXXFLAGS += -std=$(CXXSTD) $(OPT_LEVEL)
 | 
				
			||||||
 | 
					ifeq ($(ENABLE_LTO),1)
 | 
				
			||||||
LINKFLAGS += -fuse-ld=lld
 | 
					LINKFLAGS += -fuse-ld=lld
 | 
				
			||||||
 | 
					endif
 | 
				
			||||||
ABCMKARGS += ARCHFLAGS="-DABC_USE_STDINT_H $(ABC_ARCHFLAGS)"
 | 
					ABCMKARGS += ARCHFLAGS="-DABC_USE_STDINT_H $(ABC_ARCHFLAGS)"
 | 
				
			||||||
LTOFLAGS := $(CLANG_LTO)
 | 
					LTOFLAGS := $(CLANG_LTO)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										11
									
								
								README.md
									
										
									
									
									
								
							
							
						
						
									
										11
									
								
								README.md
									
										
									
									
									
								
							| 
						 | 
					@ -116,6 +116,17 @@ unless `CXX` is assigned in the call to make, e.g.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  $ make CXX=$CXX
 | 
					  $ make CXX=$CXX
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					The Makefile has many variables influencing the build process. These can be
 | 
				
			||||||
 | 
					adjusted by modifying the Makefile.conf file which is created at the
 | 
				
			||||||
 | 
					`make config-...` step (see above), or they can be set by passing an option
 | 
				
			||||||
 | 
					to the make command directly.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					For example, if you have clang, and (a compatible version of) `ld.lld`
 | 
				
			||||||
 | 
					available in PATH, it's recommended to speed up incremental builds with
 | 
				
			||||||
 | 
					lld by enabling LTO:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 $ make ENABLE_LTO=1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
For other compilers and build configurations it might be
 | 
					For other compilers and build configurations it might be
 | 
				
			||||||
necessary to make some changes to the config section of the
 | 
					necessary to make some changes to the config section of the
 | 
				
			||||||
Makefile.
 | 
					Makefile.
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue