mirror of
				https://gitlab.gnome.org/GNOME/glib.git
				synced 2025-11-04 01:58:54 +01:00 
			
		
		
		
	meson: specify when commands need to succeed in run_command
meson in git master now warns about a missing `check:` kwarg, and may eventually change the default from false to true. Take the opportunity to require `objcopy --help` to succeed -- it is unlikely to fail, but if it does something insane happened.
This commit is contained in:
		@@ -17,7 +17,7 @@ if build_machine.system() == 'linux'
 | 
				
			|||||||
  libutil_name = 'libutil'
 | 
					  libutil_name = 'libutil'
 | 
				
			||||||
  libutil = run_command('sh', '-c',
 | 
					  libutil = run_command('sh', '-c',
 | 
				
			||||||
    '''ldconfig -p | grep -o "[[:space:]]@0@\.so\(\.[0-9]\+\)\?\b"'''
 | 
					    '''ldconfig -p | grep -o "[[:space:]]@0@\.so\(\.[0-9]\+\)\?\b"'''
 | 
				
			||||||
    .format(libutil_name)).stdout().strip().split('\n')
 | 
					    .format(libutil_name), check: false).stdout().strip().split('\n')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if libutil.length() > 0
 | 
					  if libutil.length() > 0
 | 
				
			||||||
      message('Found libutil as @0@'.format(libutil[0]))
 | 
					      message('Found libutil as @0@'.format(libutil[0]))
 | 
				
			||||||
@@ -683,7 +683,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
 | 
				
			|||||||
  objcopy_supports_add_symbol = false
 | 
					  objcopy_supports_add_symbol = false
 | 
				
			||||||
  objcopy = find_program('objcopy', required : false)
 | 
					  objcopy = find_program('objcopy', required : false)
 | 
				
			||||||
  if objcopy.found()
 | 
					  if objcopy.found()
 | 
				
			||||||
    objcopy_supports_add_symbol = run_command(objcopy, '--help').stdout().contains('--add-symbol')
 | 
					    objcopy_supports_add_symbol = run_command(objcopy, '--help', check: true).stdout().contains('--add-symbol')
 | 
				
			||||||
  endif
 | 
					  endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  ld = find_program('ld', required : false)
 | 
					  ld = find_program('ld', required : false)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user