2019-04-28 15:38:23 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								idf_component_register(SRCS "cxx_exception_stubs.cpp"
							 | 
						
					
						
							
								
									
										
										
										
											2019-09-17 18:07:47 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								                            "cxx_guards.cpp"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        # Make sure that pthread is in component list
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								                        PRIV_REQUIRES pthread)
							 | 
						
					
						
							
								
									
										
										
										
											2018-01-12 13:49:13 +11:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2019-06-04 19:05:33 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								target_link_libraries(${COMPONENT_LIB} PUBLIC stdc++ gcc)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								target_link_libraries(${COMPONENT_LIB} INTERFACE "-u __cxa_guard_dummy")
							 | 
						
					
						
							
								
									
										
										
										
											2018-01-12 13:49:13 +11:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2019-09-17 18:07:47 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								# Force pthread to also appear later than stdc++ in link line
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								add_library(stdcpp_pthread INTERFACE)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								idf_component_get_property(pthread pthread COMPONENT_LIB)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								target_link_libraries(stdcpp_pthread INTERFACE stdc++ $<TARGET_FILE:${pthread}>)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								target_link_libraries(${COMPONENT_LIB} PUBLIC stdcpp_pthread)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2019-04-24 15:02:25 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								if(NOT CONFIG_COMPILER_CXX_EXCEPTIONS)
							 | 
						
					
						
							
								
									
										
										
										
											2019-06-04 19:05:33 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    target_link_libraries(${COMPONENT_LIB} INTERFACE "-u __cxx_fatal_exception")
							 | 
						
					
						
							
								
									
										
										
										
											2018-01-12 13:49:13 +11:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								endif()
							 | 
						
					
						
							
								
									
										
										
										
											2019-10-31 10:15:54 +07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								if(NOT CONFIG_COMPILER_CXX_RTTI)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    target_link_libraries(${COMPONENT_LIB} PUBLIC -fno-rtti)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								endif()
							 |